Class ListExtensions
Inheritance
object
ListExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: InsaneScatterbrain.Extensions
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 |
---|---|---|
System.Collections.Generic.List<T><T> | list | |
int | count |
Type Parameters
Name | Description |
---|---|
T |
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 |
---|---|---|
System.Collections.Generic.List<T><T> | list | |
int | count | |
T | val |
Type Parameters
Name | Description |
---|---|
T |
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 |
---|---|---|
System.Collections.Generic.IList<T><T> | list | The list. |
System.Random | random | The random instance used to shuffle. |
Type Parameters
Name | Description |
---|---|
T | The list type. |