Class ListExtensions
Inheritance
System.Object
ListExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: InsaneScatterbrain.Extensions
Syntax
public static class ListExtensions
Methods
EnsureCapacity<T>(List<T>, Int32)
Declaration
public static void EnsureCapacity<T>(this List<T> list, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T> | list | |
System.Int32 | count |
Type Parameters
Name | Description |
---|---|
T |
Pad<T>(List<T>, Int32, T)
Declaration
public static void Pad<T>(this List<T> list, int count, T val = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T> | list | |
System.Int32 | 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> | list | The list. |
System.Random | random | The random instance used to shuffle. |
Type Parameters
Name | Description |
---|---|
T | The list type. |