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!

UInt16.CompareTo

Compares the current object to another object. The UInt16 type is not CLS compliant. The CLS-compliant alternative is Int16.

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

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

Parameters [C#, C++, JScript]

value
The object to compare to the current object.

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

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

Exceptions [C#, C++, JScript]

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

Remarks [C#, C++, JScript]

When the value parameter is null, it is considered to be less than any instance.

See Also

UInt16 Structure | UInt16 Members | System Namespace | Int32 | Object