CollectionExtensionsCompareToTSource Method

Compares two arrays.

Definition

Namespace: Gemstone.Collections.CollectionExtensions
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public static int CompareTo<TSource>(
	this TSource[] array1,
	TSource[] array2,
	bool orderIsImportant = true
)

Parameters

array1  TSource
The first type array to compare to.
array2  TSource
The second type array to compare against.
orderIsImportant  Boolean  (Optional)
true if order of elements should be considered for equality; otherwise, false.

Type Parameters

TSource
Type of the array.

Return Value

Int32
An Int32 which returns 0 if they are equal, 1 if array1 is larger, or -1 if array2 is larger.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentExceptionCannot compare multidimensional arrays.

See Also