ImmutableArrayExtensions::Last<T> Method (ImmutableArray<T>::Builder^)
Returns the last element in the collection.
Assembly: System.Collections.Immutable (in System.Collections.Immutable.dll)
public: generic<typename T> [ExtensionAttribute] static T Last( ImmutableArray<T>::Builder^ builder )
Parameters
- builder
-
Type:
System.Collections.Immutable::ImmutableArray<T>::Builder^
The builder to retrieve elements from.
Return Value
Type: TThe last element in the builder.
Type Parameters
- T
The type of item in the builder.
| Exception | Condition |
|---|---|
| InvalidOperationException | Thrown if the collection is empty. |
Show: