LINQ: Single vs. SingleOrDefault [Technical Blog]
Posted: 13 Apr 2010
Updated: 15 Apr 2010
Views: 6,179
Rating: 4.50/5
Votes: 2
Popularity: 1.35
Licence: The Code Project Open License (CPOL)
Bookmarked: 2
Downloaded: 0
Like other LINQ API methods that extract a scalar value from a sequence, Single has a companion SingleOrDefault. The documentation of SingleOrDefault states that it returns a single, specific element of a sequence of values, or a default value if no such element is found, although, in my opinion