ListStackExtensions.

Peek<T>(IList<T>) Method

Summary

Gets the last item in the IList<T>.

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<T> The IList<T> to use as a stack.

Return Value

Type Description
T The last item in the collection.