ImmutableArrayExtensions::Single<T> Method (ImmutableArray<T>, Func<T, Boolean>^)

 

Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.

Namespace:   System.Linq
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

public:
generic<typename T>
[ExtensionAttribute]
static T Single(
	ImmutableArray<T> immutableArray,
	Func<T, bool>^ predicate
)

Parameters

immutableArray
Type: System.Collections.Immutable::ImmutableArray<T>

predicate
Type: System::Func<T, Boolean>^

Return Value

Type: T

Returns Boolean.

Type Parameters

T

The type of element contained by the collection.

Return to top
Show: