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!

TimeSpan.CompareTo

Compares the TimeSpan value of the current instance with the 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 the current instance.

Return Value

Value Condition
A negative integer If this instance is less than object.
A zero If the current instance and object have the same value.
A positive integer If the current 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 isn't a TimeSpan.

Remarks

The value parameter must be either a TimeSpan type or a null object reference.

In the comparison of two TimeSpan values, the number of ticks is used to determine the ordering. A new instance, regardless of its value, is considered to be greater than a null reference.

See Also

TimeSpan Structure | TimeSpan Members | System Namespace | Int64 | Object | Ticks