Class ListExtensions
Inheritance
ListExtensions
Syntax
public static class ListExtensions
Methods
EnsureCapacity<T>(List<T>, int)
Declaration
public static void EnsureCapacity<T>(this List<T> list, int count)
Parameters
| Type |
Name |
Description |
| List<T> |
list |
|
| int |
count |
|
Type Parameters
Pad<T>(List<T>, int, T)
Declaration
public static void Pad<T>(this List<T> list, int count, T val = default)
Parameters
| Type |
Name |
Description |
| List<T> |
list |
|
| int |
count |
|
| T |
val |
|
Type Parameters
Shuffle<T>(IList<T>, Random)
Randomly shuffles the elements of the list around.
Declaration
public static void Shuffle<T>(this IList<T> list, Random random)
Parameters
| Type |
Name |
Description |
| IList<T> |
list |
The list.
|
| Random |
random |
The random instance used to shuffle.
|
Type Parameters
| Name |
Description |
| T |
The list type.
|