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!

Int16.CompareTo

Compares this object to another object.

[Visual Basic]
Overridable Public Function CompareTo( _
   ByVal value As Object _
) As Integer
[C#]
public virtual int CompareTo(
   object value
);
[C++]
public: virtual int CompareTo(
   Object* value
);
[JScript]
public function CompareTo(
   value : Object
) : int;

Parameters

value
An object to compare with this instance.

Return Value

Value Description
A negative integer If this instance is less than object.
Zero If this instance and object have the same value.
A positive integer If this instance is greater than object.
A positive integer If object is a null reference (in Visual Basic Nothing). This is a special case.

Exceptions

Exception Type Condition
ArgumentException If the object is not null and is not an Int16 type.

Remarks

The CompareTo method compares this object to another object and returns an integer that indicates the relationship. It must be either an Int16 type or a null reference.

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

The object parameter must be either an Int16 type or a null reference.

See Also

Int16 Structure | Int16 Members | System Namespace | Object | UInt32