ListExtensions.Random<T>
Extension Method in ListExtensions
Declaration
public static T Random<T>(this List<T> list)
Description
Returns a random item from the list.
Type Parameters
T | The type of the list. |
Parameters
list | The list to get the random item from. |
Returns
T | A random item from the list, or default(T) if the list is empty. |