Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static class: RT.Util.ExtensionMethods.ArrayExtensions

Summary

Provides extension methods on array types.

Static methods

T[]
Concat<T>(this T[] array, T[] otherArray)
Concatenates two arrays. (see also remarks)
int
IndexOfSubarray<T>(this T[] sourceArray, T[] findWhat, IEqualityComparer<T> comparer = null)
Searches the current array for a specified subarray and returns the index of the first occurrence, or -1 if not found.
int
IndexOfSubarray<T>(this T[] sourceArray, T[] findWhat, int startIndex, int? sourceLength = null, IEqualityComparer<T> comparer = null)
T[]
Insert<T>(this T[] array, int startIndex, params T[] values)
Similar to string.Insert(int, string), but for arrays. Returns a new array with the values inserted starting from the specified startIndex. (see also remarks)
T[]
Insert<T>(this T[] array, int startIndex, T value)
Similar to string.Insert(int, string), but for arrays and for a single value. Returns a new array with the value inserted at the specified startIndex.
T[]
Remove<T>(this T[] array, int startIndex)
Similar to string.Remove(int), but for arrays. Returns a new array containing only the items before the specified startIndex. (see also remarks)
T[]
Remove<T>(this T[] array, int startIndex, int length)
Similar to string.Remove(int, int), but for arrays. Returns a new array containing everything except the length items starting from the specified startIndex. (see also remarks)
T[]
Replace<T>(this T[] array, int index, T element)
Returns a new array in which a single element has been replaced.
T[]
ReverseInplace<T>(this T[] input)
Reverses an array in-place and returns the same array.
T[]
Subarray<T>(this T[] array, int startIndex)
Similar to string.Substring(int), but for arrays. Returns a new array containing all items from the specified startIndex onwards. (see also remarks)
T[]
Subarray<T>(this T[] array, int startIndex, int length)
Similar to string.Substring(int, int), but for arrays. Returns a new array containing length items from the specified startIndex onwards. (see also remarks)
bool
SubarrayEquals<T>(this T[] sourceArray, int sourceStartIndex, T[] otherArray, IEqualityComparer<T> comparer = null)
Determines whether a subarray within the current array is equal to the specified other array.
bool
SubarrayEquals<T>(this T[] sourceArray, int sourceStartIndex, T[] otherArray, int otherStartIndex, int length, IEqualityComparer<T> comparer = null)
Determines whether the two arrays contain the same content in the specified location.