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!

Single.CompareTo

Compares this instance to specified 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
The object to compare with this instance.

Return Value

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

Exceptions

Exception Type Condition
ArgumentException If the object is a non-null reference and is not a Single.

Remarks

When comparing two Single values, the canonical ordering is used. As a special case, an instance, regardless of its value, is considered to be greater than a null object reference. If at least one of the objects to be compared is not a number (NaN), negative one will be returned; if both objects are NaN, one is returned.

The value parameter must be a Single type and a null object reference.

See Also

Single Structure | Single Members | System Namespace