|
CollectionExtensionsCompareToTSource Method
|
Compares two arrays.
Namespace: GSF.CollectionsAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax public static int CompareTo<TSource>(
this TSource[] array1,
TSource[] array2,
bool orderIsImportant = true
)
<ExtensionAttribute>
Public Shared Function CompareTo(Of TSource) (
array1 As TSource(),
array2 As TSource(),
Optional orderIsImportant As Boolean = true
) As Integer
public:
[ExtensionAttribute]
generic<typename TSource>
static int CompareTo(
array<TSource>^ array1,
array<TSource>^ array2,
bool orderIsImportant = true
)
[<ExtensionAttribute>]
static member CompareTo :
array1 : 'TSource[] *
array2 : 'TSource[] *
?orderIsImportant : bool
(* Defaults:
let _orderIsImportant = defaultArg orderIsImportant true
*)
-> int
JavaScript does not support generic types or methods.
View SourceParameters
- 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
Int32An
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 See Also