Namespace: | Sirenix.Utilities |
Assembly: | Sirenix.Utilities |
public static class ArrayUtilities
public static T[] CreateNewArrayWithAddedElement<T>(T[] array, T value)
T[] | array | The array. |
T | value | The value to add. |
T[] | The new array. |
T | The element type of the array. |
System.ArgumentNullException | The given array was null. |
public static T[] CreateNewArrayWithInsertedElement<T>(T[] array, int index, T value)
T[] | array | The array. |
System.Int32 | index | The index to insert at. |
T | value | The value to insert. |
T[] |
T | The element type of the array. |
System.ArgumentNullException | The given array was null. |
System.ArgumentOutOfRangeException | The index to insert at was out of range. |
public static T[] CreateNewArrayWithRemovedElement<T>(T[] array, int index)
T[] | array | The array. |
System.Int32 | index | The index to remove an element at. |
T[] |
T | The element type of the array. |
System.ArgumentNullException | The given array was null. |
System.ArgumentOutOfRangeException | The given index to remove an element at was out of range. |