ListExtensions
static class · namespace z3n7 · source MethodExtensions/ListExtentions.cs
public static class ListExtensions
Extension methods on lists.
Methods
Rnd
public static T Rnd<T>(this IList<T> list, bool remove = false)
Extension method for IList<T>. source
Returns a random item.
| Parameter | Description |
|---|---|
remove |
Also remove it from the list. |
Returns: The item. Throws when the list is empty.