Wintellect.PowerCollections Namespace
Algorithms Class
Algorithms Methods
GhostDoc Pro Sample Help File

Algorithms..::..RandomShuffleInPlace<(Of <(<'T>)>)> Method (IList<(Of <(<'T>)>)>, Random)

Randomly shuffles the items in a list or array, in place.

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


public static void RandomShuffleInPlace<T>(
	IList<T> list,
	Random randomGenerator
)
Public Shared Sub RandomShuffleInPlace(Of T) ( _
	list As IList(Of T), _
	randomGenerator As Random _
)
public:
generic<typename T>
static void RandomShuffleInPlace(
	IList<T>^ list, 
	Random^ randomGenerator
)

Type Parameters

T

Parameters

list
Type: IList<(Of <(<'T>)>)>
The list or array to shuffle.
randomGenerator
Type: Random
The random number generator to use to select the random order.

Remarks


Although arrays cast to IList<T> are normally read-only, this method will work correctly and modify an array passed as list.