LoadTestContext.Remove 方法 (String)

LoadTestContext 中移除具有指定键的元素。

命名空间:  Microsoft.VisualStudio.TestTools.LoadTesting
程序集:  Microsoft.VisualStudio.QualityTools.LoadTestFramework(在 Microsoft.VisualStudio.QualityTools.LoadTestFramework.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。如果在原始 LoadTestContext 中找不到 key,此方法也会返回 false。

实现

IDictionary<TKey, TValue>.Remove(TKey)

异常

异常 条件
ArgumentNullException

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

NotSupportedException

LoadTestContext 为只读。

.NET Framework 安全性

请参见

参考

LoadTestContext 类

Remove 重载

Microsoft.VisualStudio.TestTools.LoadTesting 命名空间