score:17
Accepted answer
from the reference source, yes it does, though not directly:
public static bool contains<tsource>(this ienumerable<tsource> source, tsource value) {
icollection<tsource> collection = source as icollection<tsource>;
if (collection != null) return collection.contains(value);
return contains<tsource>(source, value, null);
}
if the source enumerable implements icollection<t>
(and hashset<t>
does), then it uses the collection's contains
method.
score:1
note also it is documented to look for icollection<t>
(see remarks).
Source: stackoverflow.com
Related Query
- Using LINQ how would I check if a XML row contains a field and if it does check a different field on the same row for a value
- Does Linq Contains() check for HashSet?
- LINQ entity data model generated code error - The type 'DBContexts.Category' already contains a definition for 'ID'
- source code for LINQ 101 samples
- Contains in LINQ query and Check for Not null
- Linq to sql code for contains
- Check Nullable for object insde LinQ to Sql code
- Convert For-Each into a LINQ query for adding items in list and check wehter list contains the item already
- How does LINQ expression syntax work with Include() for eager loading
- LINQ FirstOrDefault check for default value
- Sequence contains no elements error but I want to check for null
- Why does ReSharper suggest I convert a for loop into a LINQ expression?
- Check if a string within a list contains a specific string with Linq
- How to use Linq to check if a list of strings contains any string in a list
- C# 6 null conditional operator does not work for LINQ query
- check whether a List<string> contains an element in another List<string> using LINQ
- Scalable Contains method for LINQ against a SQL backend
- How much overhead does 'Update Check' have for LINQ UPDATES
- LINQ Expression for Contains
- NHibernate.ISession does not contain a definition for Linq
- Does this LINQ code perform multiple lookups on the original data?
- NHibernate uses wrong column type for LINQ contains query (varchar to nvarchar)
- Linq Contains method for a object
- Check Contains into an int array for null property
- Suggestions for designing complex LINQ code
- Why does Linq need a setter for a 'read-only' object property?
- How to reuse a linq expression for 'Where' when using multiple source tables
- Check if results from LINQ query contains a value
- Best way to check if value exists for a key in ILookup<string, string> using linq
- Expression to get LINQ with Contains to EF for SQL IN() where on entities child's property equals value
More Query from same tag
- Check value of Field in Table B while selecting records in Table A with Linq
- Linq add dynamic where clause
- EF Code First Query and assign without savechanges
- DistinctBy not recognized as method
- How can I show results from 2 query in linq to Listview?
- Change the element in the XML Response in RestAPI
- Is it possible to do a linq query on a GridView (ASP.NET)?
- Select first record of a column using LINQ ASP.NET
- remove duplicate data in custom structure with LINQ
- Linq - Join with group by merging results
- Lambda property value selector used in lambda expression
- Order a collection of French strings and leave the empty entries at the end
- Linq Dynamic table
- Linq to dataset on dynamic columns and dynamic group by fields
- NHibernate: Change query for authorization
- Get elements of list that contains element of other list LINQ
- Optimizing a LINQ query
- How to pass Datetime externally into SQL
- LINQ: Dealing with anonymous types
- Use .Contains() in EF 6
- LINQ in ItemBinding to add columns to DataGrid
- Is there a difference between select new T() and select new T in LINQ
- parsing an xmldocument from a webrequest
- Remove all spaces in column data for entire table
- Extracting the First (Oldest) Value from Dataset Based on Column Value
- asp.net mvc select with date in Linq to entity
- Setting a datatable cell value using LINQ according to some conditions
- Searching Xml Document with linq doesn't return anything
- How to join aspnet_membership and aspnet_users using linq?
- Enumerable.Count() vs property Count