System::Collections::Generic::IEnumerable::LINQ_Single method

IEnumerable::LINQ_Single() method

Returns the single elemet of the sequence and throws an exception if there are zero or more than one element.

T System::Collections::Generic::IEnumerable<T>::LINQ_Single()

ReturnValue

The single element of the sequence

See Also

IEnumerable::LINQ_Single(const Func<T, bool>&) method

Returns the single elemet of the sequence that satisfies a condition and throws an exception if there are zero or more than one such elements.

T System::Collections::Generic::IEnumerable<T>::LINQ_Single(const Func<T, bool> &predicate)
ParameterTypeDescription
predicateconst Func<T, bool>&A function to test each element for a condition.

ReturnValue

The single element of the sequence

See Also