StringCompareTo Method (String) |
Compares this instance with a specified
String object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified
String.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public int CompareTo(
string strB
)
Parameters
- strB
- Type: SystemString
The string to compare with this instance.
Return Value
Type:
Int32A 32-bit signed integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the
value parameter.Value Condition Less than zero This instance precedes
strB. Zero This instance has the same position in the sort order as
strB. Greater than zero This instance follows
strB.-or-
strB is null.
See Also