About 11,800,000 results
Open links in new tab
  1. LINQ Where with AND OR condition - Stack Overflow

    Jan 11, 2016 · LINQ Where with AND OR condition Asked 16 years ago Modified 6 years, 4 months ago Viewed 199k times

  2. How can I conditionally apply a Linq operator? - Stack Overflow

    Jul 1, 2021 · We're working on a Log Viewer. The use will have the option to filter by user, severity, etc. In the Sql days I'd add to the query string, but I want to do it with Linq. How can I …

  3. How to group by multiple columns using LINQ - Stack Overflow

    How can I do group by multiple columns in LINQ? Something similar to this in SQL: SELECT * FROM <TableName> GROUP BY <Column1>,<Column2> How can I convert this to LINQ:

  4. Update all objects in a collection using LINQ - Stack Overflow

    Dec 30, 2008 · Is there a way to do the following using LINQ? foreach (var c in collection) { c.PropertyToSet = value; } To clarify, I want to iterate through each object in a collection and …

  5. "Or" equivalent in Linq Where () lambda expression

    Jan 3, 2018 · Given an existing Linq query you can add a where clause that takes an array of strings (SearchStrings), and check if any of them match whatever object in the collection …

  6. LINQ: Select an object and change some properties without …

    I want to change some properties of a LINQ query result object without creating a new object and manually setting every property. Is this possible? Example: var list = from something in …

  7. c# - Select distinct using linq - Stack Overflow

    Select distinct using linq [duplicate] Asked 12 years, 1 month ago Modified 8 years, 3 months ago Viewed 848k times

  8. Is a LINQ statement faster than a 'foreach' loop? - Stack Overflow

    Jul 1, 2010 · With other LINQ providers like LINQ-to-SQL, then since the query can filter at the server it should be much better than a flat foreach, but most likely you wouldn't have done a …

  9. LINQ equivalent of foreach for IEnumerable<T> - Stack Overflow

    I'd like to do the equivalent of the following in LINQ, but I can't figure out how: As others have pointed out here and abroad LINQ and IEnumerable methods are expected to be side-effect …

  10. c# - How can I get LINQ to return the object which has the max …

    How to perform .Max () on a property of all objects in a collection and return the object with maximum value [duplicate] (9 answers)