Method HasSingle
- Namespace
- Gamelogic.Extensions.Algorithms
- Assembly
- Gamelogic.Extensions.dll
HasSingle<T>(IEnumerable<T>)
Determines whether the source collection contains exactly one element.
[Version(3, 2, 0)]
public static bool HasSingle<T>(this IEnumerable<T> source)
Parameters
source
IEnumerable<T>The source collection to check.
Returns
- bool
True if the source collection contains exactly one element, false otherwise.
Type Parameters
T
The type of elements in the source collection.