CompareTo
This method compares the current OracleIntervalDS
instance to an object, and returns an integer that represents their relative values.
Declaration
// C#
public int CompareTo(object obj);
Parameters
-
obj
The object being compared to.
Return Value
The method returns:
-
Less than zero: if the current
OracleIntervalDS
represents a shorter time interval thanobj
. -
Zero: if the current
OracleIntervalDS
andobj
represent the same time interval. -
Greater than zero: if the current
OracleIntervalDS
represents a longer time interval thanobj
.
Implements
IComparable
Exceptions
ArgumentException
- The obj
parameter is not of type OracleIntervalDS
.
Remarks
The following rules apply to the behavior of this method.
-
The comparison must be between
OracleIntervalDS
s. For example, comparing anOracleIntervalDS
instance with anOracleBinary
instance is not allowed. When anOracleIntervalDS
is compared with a different type, anArgumentException
is thrown. -
Any
OracleIntervalDS
that has a value compares greater than anOracleIntervalDS
that has a null value. -
Two
OracleIntervalDS
s that contain a null value are equal.