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!

Currency.CompareTo

Compares this instance to a 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
An object that compares with this instance.

Return Value

Value Type Condition
A negative integer If this instance is less than the object.
Zero If this instance and the object have the same value.
A positive integer If this instance is greater than the object.
A positive integer If the object is null. This is a special case.

Exceptions

Exception Type Condition
ArgumentException If the object is not null or Currency.

Remarks

The CompareTo method evaluates and detrmines the relationship of this instance of Currency with a specified object, and then returns the results of that evaluation as a Int16.

The Currency values are compared in the canonical way. As a special case, an instance, regardless of its value, is considered to be greater than a null reference.The specified object must be either a Currency type or null object reference.

See Also

Currency Structure | Currency Members | System Namespace