ArrayExtensionsCompareToT(T, Int32, T, Int32, Int32) Method
Returns comparison results of two binary arrays.
Namespace: Gemstone.ArrayExtensionsAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public static int CompareTo<T>(
this T[]? source,
int sourceOffset,
T[]? other,
int otherOffset,
int count
)
where T : Object, IComparable<T>
<ExtensionAttribute>
Public Shared Function CompareTo(Of T As {Object, IComparable(Of T)}) (
source As T(),
sourceOffset As Integer,
other As T(),
otherOffset As Integer,
count As Integer
) As Integer
public:
[ExtensionAttribute]
generic<typename T>
where T : Object, IComparable<T>
static int CompareTo(
array<T>^ source,
int sourceOffset,
array<T>^ other,
int otherOffset,
int count
)
JavaScript does not support generic types or methods.
- source T
- Source array.
- sourceOffset Int32
- Offset into source array to begin compare.
- other T
- Other array to compare to source array.
- otherOffset Int32
- Offset into other array to begin compare.
- count Int32
- Number of bytes to compare in both arrays.
- T
- Type of array.
Int32
A signed integer that indicates the relative comparison of source array and other array.
Return Value | Description |
---|
Less than zero | Source array is less than other array. |
Zero | Source array is equal to other array. |
Greater than zero | Source array is greater than other array. |
In Visual Basic and C#, you can call this method as an instance method on any object of type
T. 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).
Note that if both arrays are null the arrays will be considered equal.
If one array is null and the other array is not null, the non-null array will be considered larger.
ArgumentOutOfRangeException | sourceOffset or otherOffset is outside the range of valid indexes for the associated array -or-
count is less than 0 -or-
sourceOffset or otherOffset and count do not specify a valid section in the associated array.
|