NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

UInt64.CompareTo

Compares the current Object to another object. The UInt64 type is not CLS compliant. The CLS-compliant alternative is Int64.

[C#]
public virtual int CompareTo(
   object value
);
[C++]
public: virtual int CompareTo(
   Object* value
);
[JScript]
public function CompareTo(
   value : Object
) : int;

[Visual Basic] The UInt64 type cannot be used in Visual Basic.

Parameters [C#, C++, JScript]

value
The value that compares with the current object.

Return Value [C#, C++, JScript]

Value Condition
Less than 0 The current object is less than the value .
0 The current object equals the value.
Greater than 0 The current object is greater than the value.

Exceptions [C#, C++, JScript]

Exception Type Condition
ArgumentException If the value is not of type UInt64 and is not a null reference (in Visual Basic Nothing).

Remarks [C#, C++, JScript]

The CompareTo method determines the relationship of the current Object to another object and returns an integer that indicates the relationship.

In the comparison of two UInt64 values, canonical ordering is used. As a special case, an instance, regardless of its value, is considered to be greater than a null reference.

You should use the CompareTo method instead of subtraction because very large negative numbers will wrap to positive.

The value parameter must be a UInt64 type and a null reference.

See Also

UInt64 Structure | UInt64 Members | System Namespace | Object