Table of Contents

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

source IEnumerable<T>

The source to skip the last element of.

Returns

IEnumerable<T>

All elements of source except the last.

Type Parameters

T

The type of elements in the source.