Click or drag to resize

CollectionExtensionsCompareToTSource Method

Compares two arrays.

Namespace: GSF.Collections
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.205-beta+5ef4169f3b1079d8b163dd363614f656bd140924
Syntax
public static int CompareTo<TSource>(
	this TSource[] array1,
	TSource[] array2,
	bool orderIsImportant = true
)
View Source

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
The generic 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
ExceptionCondition
ArgumentExceptionCannot compare multidimensional arrays.
See Also