.NET Framework Class Library
Enumerable..::.SingleOrDefault Method

Returns a single, specific element of a sequence of values, or a default value if no such element is found.

Overload List

  NameDescription
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkSingleOrDefault<(Of <(TSource>)>)(IEnumerable<(Of <(TSource>)>))Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkSingleOrDefault<(Of <(TSource>)>)(IEnumerable<(Of <(TSource>)>), Func<(Of <(TSource, Boolean>)>))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.
Top
See Also

Reference

Tags :


Page view tracker