Click or drag to resize

pickPickT Method (IListT, RandomGenerator)

Namespace:  WhetStone.Random
Assembly:  WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
C#
public static T Pick<T>(
	this IList<T> this,
	RandomGenerator gen = null
)

Parameters

this
Type: System.Collections.GenericIListT
The IListT to search in.
gen (Optional)
Type: WhetStone.RandomRandomGenerator
The RandomGenerator to use to roll for a random element. for GlobalRandomGenerator.

Type Parameters

T
The type of the IListT.

Return Value

Type: T
A random element from this.

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