Summary
Chooses a random item.
- Namespace
- StrideToolkit
.Collections - Containing Type
- RandomListExtensions
Syntax
public static T Choose<T>(this Random random, params T[] collection)
Type Parameters
Name | Description |
---|---|
T |
Parameters
Name | Type | Description |
---|---|---|
random | Random | An instance of Random . |
collection | T[] | Collection to choose item from. |
Return Value
Type | Description |
---|---|
T | A random item from collection |