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