AlgorithmsRandomShuffleInPlaceT Method (IListT, Random) |
Randomly shuffles the items in a list or array, in place.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static void RandomShuffleInPlace<T>(
IList<T> list,
Random randomGenerator
)
public:
generic<typename T>
static void RandomShuffleInPlace(
IList<T>^ list,
Random^ randomGenerator
)
Parameters
- list
- Type: System.Collections.GenericIListT
The list or array to shuffle. - randomGenerator
- Type: SystemRandom
The random number generator to use to select the random order.
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:X3Platform.Collections.Algorithms.RandomShuffleInPlace``1(System.Collections.Generic.IList{``0},System.Random)"]
RemarksAlthough arrays cast to IList<T> are normally read-only, this method
will work correctly and modify an array passed as list.
See Also