14.4.12.1 CompareTo
This method compares the current instance to the supplied object and returns an integer that represents their relative values.
Declaration
// C#
public int CompareTo(object obj);Parameters
- 
                        
objThe supplied instance.
 
Return Value
The method returns a number:
- 
                        
Less than zero: if the value of the current instance is less than
obj. - 
                        
Zero: if the value of the current instance is equal to
obj. - 
                        
Greater than zero: if the value of the current instance is greater than
obj. 
Implements
IComparable 
                  
Exceptions
ArgumentException - The parameter is not of type OracleDecimal.
                  
Remarks
The following rules apply to the behavior of this method.
- 
                        
The comparison must be between
OracleDecimals. For example, comparing anOracleDecimalinstance with anOracleBinaryinstance is not allowed. When anOracleDecimalis compared with a different type, anArgumentExceptionis thrown. - 
                        
Any
OracleDecimalthat has a value compares greater than anOracleDecimalthat has a null value. - 
                        
Two
OracleDecimals that contain a null value are equal.