ArrayExtensions.Random<T>
Extension Method in ArrayExtensions
Declaration
public static T Random<T>(this T[] array)
Description
Returns a random element from the array.
Type Parameters
T | The type of the array. |
Parameters
array | The array to get the random element from. |
Returns
T | A random element from the array, or default(T) if the array is empty. |