AlgorithmsRandomShuffleT Method (IEnumerableT) |
Randomly shuffles the items in a collection, yielding a new collection.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static T[] RandomShuffle<T>(
IEnumerable<T> collection
)
public:
generic<typename T>
static array<T>^ RandomShuffle(
IEnumerable<T>^ collection
)
Parameters
- collection
- Type: System.Collections.GenericIEnumerableT
The collection to shuffle.
Type Parameters
- T
- The type of the items in the collection.
Return Value
Type:
TAn array with the same size and items as
collection, but the items in a randomly chosen order.
See Also