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