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

 Posted by Tripati_tutu on 1/28/2011 | Category: ASP.NET Interview questions | Views: 6939 | Points: 40

The Select clause and SelectMany() method both 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, the SelectMany() method produces a single result that contains a concatenated collection from the query.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response