天天看点

String.Compare 方法 (String, Int32, String, Int32, Int32)

String.Compare 方法 (String, Int32, String, Int32, Int32)

参数 <dl></dl>

<dt>strA</dt>

<dd></dd>

要在比较中使用的第一个字符串。

<dl></dl>

<dt>indexA</dt>

strA 中子字符串的位置。

<dt>strB</dt>

要在比较中使用的第二个字符串。

<dt>indexB</dt>

strB 中子字符串的位置。

<dt>length</dt>

要比较的子字符串中字符的最大数量。

一个 32 位有符号整数,指示两个比较数之间的词法关系。

值                    Condition

小于零          strA 中的子字符串小于 strB 中的子字符串。

零                 子字符串相等,或者 length 为零。

大于零         strA 中的子字符串大于 strB 中的子字符串。

继续阅读