EntityDAC

IObjectEnumerable<T>.Single Method

Returns the only element of an enumeration, and throws an exception if there is not exactly one element in the enumeration.

Class

IObjectEnumerable<T>

Syntax

function Single: T;

Remarks

Use the method to obtain the only element of an enumeration. If the enumeration contains more than one element or the enumeration is empty, the method throws an exception. To instead return nil when the enumeration is empty or contains more that one element, use the M:Devart.EntityDAC.IObjectEnumerable{T}.SingleOrDefault() method.

See Also

© 1997-2017 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback