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!

UInt32.CompareTo

Compares the current object to another object. The UInt32 type is not CLS compliant. The CLS-compliant alternative is Int32.

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

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

Parameters [C#, C++, JScript]

value
The object to compare with the current object.

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

Value Meaning
Less than 0 The current object is less than the specified object.
0 The current object is equal to the specified object.
Greater than 0 The current object is greater than the specified object.

Exceptions [C#, C++, JScript]

Exception Type Condition
ArgumentException If the object is not a UInt32 type.

Remarks [C#, C++, JScript]

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

The object must be a UInt32 type. The value null is less than any instance.

Note   You need to use compare rather than subtraction because it will wrap large negative numbers to positive.

See Also

UInt32 Structure | UInt32 Members | System Namespace | Object