-
Notifications
You must be signed in to change notification settings - Fork 26
SingleOrDefault
Eugene Sadovoi edited this page Jul 7, 2016
·
1 revision
Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
SingleOrDefault([predicate])
A function to test an element for a condition: Boolean predicate(TSource)
The single element of the input sequence that satisfies the condition, or default(TSource) if no such element is found.