CompareTo
This method compares the current OracleDate instance to an object, and returns an integer that represents their relative values.
Declaration
// C#
public int CompareTo(object obj);Parameters
-
objAn object.
Return Value
The method returns:
-
Less than zero: if the current
OracleDateinstance value is less than that ofobj. -
Zero: if the current
OracleDateinstance andobjvalues are equal. -
Greater than zero: if the current
OracleDateinstance value is greater thanobj.
Implements
IComparable
Exceptions
ArgumentException - The obj parameter is not an instance of OracleDate.
Remarks
The following rules apply to the behavior of this method.
-
The comparison must be between
OracleDates. For example, comparing anOracleDateinstance with anOracleBinaryinstance is not allowed. When anOracleDateis compared with a different type, anArgumentExceptionis thrown. -
Any
OracleDatethat has a value compares greater than anOracleDatethat has a null value. -
Two
OracleDates that contain a null value are equal.