A struct that helps you use a part of an array.
Can be reused if you free it by calling ArrayPool<T>.Free(ToolBuddy.Pooling.Collections.SubArray<T>)
T |
Public Attributes | |
readonly T[] | Array |
The array where data is stored in More... | |
readonly int | Count |
The number of elements to be used in that array, counted from the start of the array More... | |
Public Member Functions | |
T[] | CopyToArray (ArrayPool< T > arrayPool) |
Returns a new array that which length is Count and contains the elements from Array More... | |
override bool | Equals (object obj) |
bool | Equals (SubArray< T > obj) |
override int | GetHashCode () |
SubArray (T[] array) | |
Creates an instance that will use all the elements of the given array More... | |
SubArray (T[] array, int count) | |
Creates an instance that will use the first "count" elements of the given array More... | |
Static Public Member Functions | |
static bool | operator!= (SubArray< T > a, SubArray< T > b) |
static bool | operator== (SubArray< T > a, SubArray< T > b) |
SubArray | ( | T[] | array | ) |
Creates an instance that will use all the elements of the given array
SubArray | ( | T[] | array, |
int | count | ||
) |
Creates an instance that will use the first "count" elements of the given array
T [] CopyToArray | ( | ArrayPool< T > | arrayPool | ) |
override bool Equals | ( | object | obj | ) |
bool Equals | ( | SubArray< T > | obj | ) |
override int GetHashCode | ( | ) |
readonly T [] Array |
The array where data is stored in
readonly int Count |
The number of elements to be used in that array, counted from the start of the array