Method in EnumerableRandomExtension
Returns a random element from enumerable
.
This method uses System.Random to make a selection, which is cryptographically insecure. This means that this method should not be used for security-critical decisions.
System.Collections.Generic.IEnumerable<T>
enumerable
The collection to choose an item from.
T
The type of element in enumerable
.
A random element in enumerable
.