Mono Class Library: System.String Overview | MembersSystem.String.Compare Method |
Compares two string objects in a case-sensitive manner. [Edit]
|
The return value is a negative number, zero, or a positive number reflecting the sort order of the specified strings. For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:
[Edit]
Value Meaning A negative number strA is lexicographically < strB. Zero strA is lexicographically == strB. A positive number strA is lexicographically > strB.
This method performs a case-sensitive operation.
Note:[Edit]The result of comparing any string (including the empty string) to a null reference is greater than zero. The result of comparing two null references is zero. Uppercase letters evaluate greater than their lowercase equivalents.
The method uses the culture (if any) of the current thread to determine the ordering of individual characters. The two strings are compared on a character-by-character basis.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0