Click or drag to resize

RandomizerExtensionsRandomPickT Method

Picks a random element from the given array

Namespace:  Cauldron
Assembly:  Cauldron.Randomizer (in Cauldron.Randomizer.dll) Version: 3.2.0.2
Syntax
public static T RandomPick<T>(
	this T[] array
)

Parameters

array
Type: T
The array to pick a random element from

Type Parameters

T
The type of element in the array

Return Value

Type: T
The randomly picked element

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . 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