ListExtensions.Shuffle<T>
Extension Method in ListExtensions
Declaration
public static void Shuffle<T>(this List<T> list)Description
Shuffles the list in place. The shuffle is done using the Fisher-Yates algorithm.
Type Parameters
| T | The type of the list. |
Parameters
| list | The list to shuffle. |
Overload
Declaration
public static void Shuffle<T>(this List<T> list, Random rng)Description
Shuffles the list in place using the given random number generator. The shuffle is done using the Fisher-Yates algorithm.
Type Parameters
| T | The type of the list. |
Parameters
| list | The list to shuffle. |
| rng | The random number generator to use. |