MathHelperChooseT Method (ICollectionT)

RAGE Plugin Hook Documentation

[This is preliminary documentation and is subject to change.]

Gets a random object from the specified collection.

Namespace:  Rage
Assembly:  RagePluginHook (in RagePluginHook.dll) Version: 0.0.0.0 (0.56.1131.11510)
Syntax

public static T Choose<T>(
	ICollection<T> objects
)

Parameters

objects
Type: System.Collections.GenericICollectionT
The objects to choose from. If null, the default value of T will be used.

Type Parameters

T
The type of object to choose from.

Return Value

Type: T
A random object from the specified collection.
See Also

Reference