Collation.Compare Method (string, string)Collation.Compare Method (String, String)Collation::Compare Method (String^, String^)
Parameters
- value1
- value2
Return Value
Type: System.Int32System.Int32System::Int32
A signed number that indicates the relative order of value1 and value2. The return value has the following meanings.
- Less than zero indicates that value1 is less than value2.
- Zero indicates that value1 is equal to value2.
- Greater than zero indicates that value1 is greater than value2.
Exceptions
Exception | Condition |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException |
value1 or value2 is null
a null reference (Nothing in Visual Basic)
nullptr .
|
Remarks
This method implements thefn:compare
function, and is used by the greater than, greater equal, less
than and less equal operators for the specified collation, and should follow the same semantics.