Class IListExtensions
Extension methods for IListExtensions.
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain
Assembly: BotBrain.Samples.dll
Syntax
public static class IListExtensions
Methods
View SourceRandomChoice<T>(IList<T>, Random?)
Gets a random item from the list.
Declaration
public static T RandomChoice<T>(this IList<T> list, Random? random = null)
Parameters
Type | Name | Description |
---|---|---|
IList<T> | list | The list. |
Random | random | An optional instance of Random to use. |
Returns
Type | Description |
---|---|
T | A random item. |
Type Parameters
Name | Description |
---|---|
T | The item type. |