提供用于比较所提供名称与控件类型对象的隐式运算符。
命名空间: Microsoft.VisualStudio.TestTools.UITesting
程序集: Microsoft.VisualStudio.TestTools.UITest.Extension(在 Microsoft.VisualStudio.TestTools.UITest.Extension.dll 中)
语法
声明
Public Shared Widening Operator CType ( _
name As String _
) As ControlType
public static implicit operator ControlType (
string name
)
static implicit operator ControlType^ (
String^ name
)
F# 不支持新转换运算符的声明。
JScript 不支持新转换运算符的声明。
参数
- name
类型:System.String
要与 Name 属性进行比较的控件类型名称。
返回值
类型:Microsoft.VisualStudio.TestTools.UITesting.ControlType
如果提供的名称等于此控件对象的 Name 属性,则为 true;否则为 false。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。