Summary
Gets the last item in the
IList<T>.
- Namespace
- StrideToolkit
.Collections - Containing Type
- ListStackExtensions
Syntax
public static T Peek<T>(this IList<T> stack)
Type Parameters
| Name | Description |
|---|---|
| T | The type of elements in the collection. |
Parameters
| Name | Type | Description |
|---|---|---|
| stack | IList |
The IList<T> to use as a stack. |
Return Value
| Type | Description |
|---|---|
| T | The last item in the collection. |
