Method ButLast
- Namespace
- Gamelogic.Extensions.Algorithms
- Assembly
- Gamelogic.Extensions.dll
ButLast<T>(IEnumerable<T>)
Returns an enumerable of all elements in the source but the last, keeping them in order.
public static IEnumerable<T> ButLast<T>(this IEnumerable<T> source)
Parameters
sourceIEnumerable<T>The source to skip the last element of.
Returns
- IEnumerable<T>
All elements of
sourceexcept the last.
Type Parameters
TThe type of elements in the source.