In LINQ, if we use "LINQ to Objects" in our applications it will give us a chance to use IEnumerable or IEnumerable<T> collections directly in LINQ queries, without using any of intermediate LINQ provider or API such as LINQ to SQL or LINQ to XML. By using LINQ to Objects we can query any of enumerable collections such as List<T>, Array, or Dictionary<TKey, TValue>.
The LINQ to Objects provides a new way to get data from collections with LINQ queries but before that we need to write lot of foreach loops to get data from the collections.
The LINQ to Objects provides more advantages when compared with traditional foreach loops like
If we use LINQ in complex operations, then we will realize the benefit of using LINQ instead of traditional iteration loops.
Now we will see how to use LINQ with objects. Following are the various objects which we can use with LINQ.
In next chapters we will learn how to use all these objects in LINQ with examples.