the two code snippets are equivalent, i.e. they should always produce the same results under all circumstances. of course, that assumes that
.contains() are what we expect them to be; if they are property getters/methods which have curious side-effects such as modifying the contents of
tracks, then anything could happen.
in other words, without knowing what the rest of your code looks like, we cannot help you, because there is no semantic difference between the two code snippets.
- When Where clause is used inside Linq statement produces different results than when used outside
- LINQ operater Where not supporting any of the members when used inside generic method
- C# LINQ performance when extension method called inside where clause
- using If statement inside where clause in LINQ
- Place if statement inside a where clause in Linq for Entity framework
- Linq Where clause to generate List based on results of a different List
- Interpreting Sql with where and having statement to linq giving different results
- Stored Procedure Results Return Null When Where Clause is Added in LINQ
- Linq Query with a Where clause in an Include statement
- linq where clause when id is in an array
- Why no intellisense when LINQ statement has no where clause?
- When using a LINQ Where clause on a Dictionary, how can I return a dictionary of the same type?
- When to use lambda expressions instead of a Where clause in LINQ
- Why does LINQ GroupBy produce different results when preceded by ToArray()?
- Linq with where clause in many-to-many EF Code First object
- Different results in Entity Framework than LINQ to SQL
- Linq Where local counter closure different results in VS watch
- Include where clause on linq query when param is not null Npgsql
- LINQ query returns old results when source list is re-initialized
- LINQ - CASE statement in WHERE clause
- Entity Framework - LINQ statement with WHERE clause based on NULLABLE parameter
- C# - Linq optimize code with List and Where clause
- Using LINQ when my where clause will contain a LIST
- In a LINQ statement using closures, is it possible to specify a where clause within a closure?
- Linq to NHibernate returns different results than HQL?
- LINQ Statement with where clause makes the execution slow
- LINQ statement where result count is used in expression's condition
- How to place an If/Else statement in a where clause in a linq query?
- Why does my Linq Where clause produce more results instead of less?
- Error "The LINQ expression node type 'Invoke' is not supported in LINQ to Entities" in where clause inside the method
More Query from same tag
- Linq query two arrays for difference based on field comparison
- IQueryable optional OrderBy with PredicateBuilder and Entity Framework
- Entity Framework Include in Where Subquery
- Get data part by part in asp.net Gridview
- Linq - Question concerning the 'Any' method
- Change SQL Query to LINQ, asp.net MVC
- multilevel linq query with left join
- parsing a JSON response using JSON.NET and arrays & LINQ
- Linq to XML query involving attributes
- Make dynamic dictionary from json file
- C# Expression Tree Simple Arithmetic
- Linq to XML Search
- Syntax Error within Linq statement
- LINQ returning IEnumerable<string> value in seeming charArray
- get associated records in ms dynamics crm
- Applying child collections to matching parents in the parent collection
- foreach in linq result not working
- How to search a text using entity framework after split?
- Selecting Distinct Items within Array using PowerShell and Linq
- Inner Join Using Lambda (LINQ)
- Get Top x Products using Linq
- Linq syntax error in ASP MVC controller method
- Select 1 column from a Group By LINQ query
- Linq to exclude a custom object from one List based on membership of another List (c#)
- How to express LEFT JOIN when 2 entities are linked by a navigation properties
- Complex SQL to LINQ conversion with subquery
- Multiple Tables Group and substract sum of columns using linq sql
- Excel to SQL, C# libraries
- Hanging Linq query with Guid.Empty in the where expression
- Linq to SQL Extension Method: Method overloading, error