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