Method TryFirstTwo
- Namespace
- DisCatSharp.Common
- Assembly
- DisCatSharp.Common.dll
TryFirstTwo<T>(IEnumerable<T>, out (T first, T second))
Gets the two first elements of the IEnumerable<T>, if they exist.
public static bool TryFirstTwo<T>(this IEnumerable<T> enumerable, out (T first, T second) values)
Parameters
enumerable
IEnumerable<T>The enumerable.
values
(T first, T second)The output values. Undefined if
is returned.false
Returns
- bool
Whether the IEnumerable<T> contained enough elements.
Type Parameters
T