WebTestContext.Remove Method (String)
Removes the element with the specified key from the WebTestContext.
Namespace: Microsoft.VisualStudio.TestTools.WebTesting
Assembly: Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)
Syntax
'Declaration
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
Parameters
key
Type: StringThe key to remove from the WebTestContext.
Return Value
Type: Boolean
true if the element is successfully removed; otherwise, false. This also returns false if the key is not found.
Implements
IDictionary.Remove(UTP)
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | key is nulla null reference (Nothing in Visual Basic). |
Remarks
No changes are made to the underlying collection if the key to remove is not found.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.