Table of Contents

Class ExtensionMethods

Namespace
BlazerTech.CharacterManagement.Core
Assembly
Assembly-CSharp.dll
public static class ExtensionMethods
Inheritance
ExtensionMethods

Methods

GetRandom<T>(IReadOnlyList<T>)

Returns a random element from an IReadOnlyList.

public static T GetRandom<T>(this IReadOnlyList<T> list)

Parameters

list IReadOnlyList<T>

The IReadOnlyList to pick from.

Returns

T

A random element from the list.

Type Parameters

T

The type of the elements in the list.

Exceptions

InvalidOperationException

Thrown if the list is null or empty.