 | EnumerableExtensionsShuffleT Method |
Produces a new list with the same items as the original list but in random order
Namespace:
TestHelperExtensions
Assembly:
CBI.TestHelperExtensions (in CBI.TestHelperExtensions.dll) Version: 2.1.0.1
Syntaxpublic static IEnumerable<T> Shuffle<T>(
this IEnumerable<T> list
)
<ExtensionAttribute>
Public Shared Function Shuffle(Of T) (
list As IEnumerable(Of T)
) As IEnumerable(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static IEnumerable<T>^ Shuffle(
IEnumerable<T>^ list
)
[<ExtensionAttribute>]
static member Shuffle :
list : IEnumerable<'T> -> IEnumerable<'T>
Parameters
- list
- Type: System.Collections.GenericIEnumerableT
The list to be shuffled
Type Parameters
- T
- The type of the elements of the list
Return Value
Type:
IEnumerableTAn IEnumerable containing elements of the same type as
the original IEnumerable but in a random order
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableT. 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