SingleOrDefaultExtension Class

SingleOrDefault extension.

Definition

Namespace: MoreLinq.Extensions
Assembly: MoreLinq (in MoreLinq.dll) Version: 4.4.0+6d97c3b1d482f98300f4446df14742b0e3fafbec
C#
public static class SingleOrDefaultExtension
Inheritance
Object    SingleOrDefaultExtension

Methods

SingleOrDefaultT 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.

See Also