RandomElement<T>(IEnumerable<T>)
Last updated
Was this helpful?
Method in EnumerableRandomExtension
Returns a random element from enumerable .
public static T RandomElement<T>(this IEnumerable<T> 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 .
Last updated
Was this helpful?
Was this helpful?
