Friday 30 March 2012

What is the difference between First() and Single() extension methods in LINQ

First() - There is at least one result, an exception is thrown if no result is returned. 

Single() - There is exactly 1 result, no more, no less, an exception is thrown if no result is returned.

No comments:

Post a Comment