WebTestContext.Remove 方法 (KeyValuePair<String, Object>)
从 WebTestContext 中移除 KeyValuePair<TKey, TValue>。
命名空间: Microsoft.VisualStudio.TestTools.WebTesting
程序集: Microsoft.VisualStudio.QualityTools.WebTestFramework(在 Microsoft.VisualStudio.QualityTools.WebTestFramework.dll 中)
语法
声明
Public Function Remove ( _
keyValuePair As KeyValuePair(Of String, Object) _
) As Boolean
public bool Remove(
KeyValuePair<string, Object> keyValuePair
)
public:
virtual bool Remove(
KeyValuePair<String^, Object^> keyValuePair
) sealed
abstract Remove :
keyValuePair:KeyValuePair<string, Object> -> bool
override Remove :
keyValuePair:KeyValuePair<string, Object> -> bool
public final function Remove(
keyValuePair : KeyValuePair<String, Object>
) : boolean
参数
- keyValuePair
类型:System.Collections.Generic.KeyValuePair<String, Object>
要从集合中移除的 KeyValuePair<TKey, TValue> 对象。
返回值
类型:System.Boolean
如果该元素已成功移除,则为 true;否则为 false。如果找不到此键,还会返回 false。
实现
备注
如果找不到要移除的键,则不对基础集合做任何更改。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。