WebTestContext.Remove 方法 (String)

WebTestContext 中移除包含指定键的元素。

命名空间:  Microsoft.VisualStudio.TestTools.WebTesting
程序集:  Microsoft.VisualStudio.QualityTools.WebTestFramework(在 Microsoft.VisualStudio.QualityTools.WebTestFramework.dll 中)

语法

声明
Public Function Remove ( _
    key As String _
) As Boolean
public bool Remove(
    string key
)
public:
virtual bool Remove(
    String^ key
) sealed
abstract Remove : 
        key:string -> bool 
override Remove : 
        key:string -> bool 
public final function Remove(
    key : String
) : boolean

参数

返回值

类型:System.Boolean
如果该元素已成功移除,则为 true;否则为 false。如果找不到此 key,还会返回 false。

实现

IDictionary<TKey, TValue>.Remove(TKey)

异常

异常 条件
ArgumentNullException

key 为 nullnull 引用(在 Visual Basic 中为 Nothing)。

备注

如果找不到要移除的键,则不对基础集合做任何更改。

.NET Framework 安全性

请参见

参考

WebTestContext 类

Remove 重载

Microsoft.VisualStudio.TestTools.WebTesting 命名空间