Compares substrings of the two specified NullableString structures ,without considering the local national language or culture.
A 32-bit signed integer indicating the lexical relationship between the two comparands.
Value | Description |
---|---|
A negative integer | the substring in a is less than the substring in b. |
Zero | the substring in a is equal to the substring in b. |
A positive integer |
the substring in a is greater than the
substring in b.
-or- b is Null. |
By definition, any NullableString, including the Empty string, compares greater than Null; and two Null compare equal to each other. indexA and indexB are zero-based. length cannot be negative. If length is zero, then zero is returned. The number of characters compared is the lesser of the length of a less indexA, the length of b less indexB, and length.
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException |
The sum of indexA and length is
greater than a.
-or- The sum of indexB and length is greater than b.-or- indexA, indexB or length is negative. |
NullableString Class | NullableTypes Namespace | NullableString.CompareOrdinal Overload List