ImmutableArrayExtensions::First<T> Method (ImmutableArray<T>)
Returns the first element in an array.
Assembly: System.Collections.Immutable (in System.Collections.Immutable.dll)
public: generic<typename T> [ExtensionAttribute] static T First( ImmutableArray<T> immutableArray )
Parameters
- immutableArray
-
Type:
System.Collections.Immutable::ImmutableArray<T>
The array to get an item from.
Return Value
Type: TThe first item in the array.
Type Parameters
- T
The type of element contained by the collection.
| Exception | Condition |
|---|---|
| InvalidOperationException | If the array is empty. |
Show: