StringType.StrCmp(String, String, Boolean) 方法   
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
比较两个字符串。
此 API 支持产品基础结构,不能在代码中直接使用。
public:
 static int StrCmp(System::String ^ sLeft, System::String ^ sRight, bool TextCompare);public static int StrCmp (string? sLeft, string? sRight, bool TextCompare);public static int StrCmp (string sLeft, string sRight, bool TextCompare);static member StrCmp : string * string * bool -> intPublic Shared Function StrCmp (sLeft As String, sRight As String, TextCompare As Boolean) As IntegerPublic Function StrCmp (sLeft As String, sRight As String, TextCompare As Boolean) As Integer参数
- sLeft
- String
必需。 要与 sRight 进行比较的字符串。
- sRight
- String
必需。 要与 sLeft 进行比较的字符串。
- TextCompare
- Boolean
必需。 如果要执行不区分大小写的比较,则为 True;否则为 False。
返回
| 值 | 条件 | 
|---|---|
| 零 | 这两个字符串相等。 | 
| 小于零 | sLeft小于sRight。 | 
| 大于零 | sLeft大于sRight。 | 
注解
此类支持 Visual Basic 编译器,不应直接从代码使用。