 | ListExtensionMethodsToRandomOrderT Method (IListT, Random) |
Enumerates the elements of the specified list in random order.
Namespace: Slash.Collections.ExtensionsAssembly: Slash.Collections (in Slash.Collections.dll) Version: 1.0.6018.40177
Syntaxpublic static List<T> ToRandomOrder<T>(
this IList<T> list,
Random random
)
<ExtensionAttribute>
Public Shared Function ToRandomOrder(Of T) (
list As IList(Of T),
random As Random
) As List(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static List<T>^ ToRandomOrder(
IList<T>^ list,
Random^ random
)
[<ExtensionAttribute>]
static member ToRandomOrder :
list : IList<'T> *
random : Random -> List<'T>
Parameters
- list
- Type: System.Collections.GenericIListT
List to enumerate the items of. - random
- Type: SystemRandom
Random number generator to use.
Type Parameters
- T
- Type of list to enumerate the items of.
Return Value
Type:
ListTList with the same items in random order.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IListT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also