TradeMUX SDK Documentation  1.0
TradeMUX SDK Documentation
int ArrayCompare< T > ( T[]  array1,
T[]  array2,
int  start1 = 0,
int  start2 = 0,
int  count = WHOLE_ARRAY 
)

Retunrs result of comparing two arrays of the same type

Template Parameters
TType of arrays elements
Parameters
array1First array
array2Second array
start1The element's initial index in the first array, from which comparison starts. The default start index - 0
start2The element's initial index in the second array, from which comparison starts. The default start index - 0
countNumber of elements to be compared. All elements of both arrays participate in comparison by default
Returns
  • -1, if array1[] less than array2[]
  • 0, if array1[] equal to array2[]
  • 1, if array1[] more than array2[]
  • -2, if an error occurs due to incompatibility of the types of compared arrays or if start1, start2 or count values lead to falling outside the array.
Type Constraints
T :struct 
T :IComparable<T>