Top "Linq-to-objects" questions

The term "LINQ to Objects" refers to the use of LINQ queries with any IEnumerable or IEnumerable<T> collection directly, without the use of an intermediate LINQ provider or API such as LINQ to SQL or LINQ to XML.

Like operator in LINQ to Objects

I'm trying to emulate the LIKE operator in LINQ to Objects. Here my code: List<string> list = new …

c# linq-to-objects sql-like
Count values in Dictionary using LINQ and LINQ extensions

I have a dictionary that looks something like this: Dictionary<String, List<String>> test1 : 1,3,4,5 test2 : 2,3,6,7 test3 : 2,8 …

c# .net linq dictionary linq-to-objects
Optimizing Aggregate for String Concatenation

Update - for those of a facetious frame of mind, you can assume that Aggregate still produces the normal result …

c# optimization linq-to-objects
Exception handling within a LINQ Expression

I have a simple LINQ-expression like: newDocs = (from doc in allDocs where GetDocument(doc.Key) != null select doc).ToList(); The …

c# linq-to-objects
Learning about LINQ

Overview One of the things I've asked a lot about on this site is LINQ. The questions I've asked have …

linq linq-to-sql linq-to-entities linq-to-objects
(ID/ParentID) list to Hierarchical list

MyClass consists of ID ParentID and List<MyClass> as Children I have list of MyClass like this ID …

c# list linq-to-objects hierarchical-data
C# System.Linq.Lookup Class Removing and Adding values

I'm using Lookup class in C# as my prime data container for the user to select values from two Checked …

linq c#-3.0 linq-to-objects lookup
how to `.Take()` on a string and get a string at the end?

LINQ to Objects supports queries on string objects but when I use code such as below: string SomeText = "this is …

c# linq string linq-to-objects take
linq to entities vs linq to objects - are they the same?

I usually use the term entity to represent a business data object and in my mind, the linq to entities …

c# linq linq-to-entities linq-to-objects
How do i get the difference in two lists in C#?

Ok so I have two lists in C# List<Attribute> attributes = new List<Attribute>(); List<…

c# linq list linq-to-objects