Curvy  8.3.0
SubArray< T > Struct Template Reference

Detailed Description

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>)

Template Parameters
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)
 

Constructor & Destructor Documentation

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

Member Function Documentation

T [] CopyToArray ( ArrayPool< T >  arrayPool)

Returns a new array that which length is Count and contains the elements from Array

override bool Equals ( object  obj)
bool Equals ( SubArray< T >  obj)
override int GetHashCode ( )
static bool operator!= ( SubArray< T >  a,
SubArray< T >  b 
)
static
static bool operator== ( SubArray< T >  a,
SubArray< T >  b 
)
static

Member Data Documentation

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


The documentation for this struct was generated from the following file: