Friday 30 March 2012

What is the difference between the Select clause and SelectMany() method in LINQ?

What is the difference between the Select clause and SelectMany() method in LINQ?
Both the Select clause and SelectMany() method are used to produce a result value from a source of values. The difference lies in the result set. The Select clause is used to produce one result value for every source value. The result value is a collection that has the same number of elements from the query. In contrast, theSelectMany() method produces a single result that contains a concatenated collection from the query.

No comments:

Post a Comment