Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Adds an element with the provided key and value to the WebTestContext.
Namespace: Microsoft.VisualStudio.TestTools.WebTesting
Assembly: Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)
Syntax
'Declaration
Public Sub Add ( _
key As String, _
value As Object _
)
public void Add(
string key,
Object value
)
public:
virtual void Add(
String^ key,
Object^ value
) sealed
abstract Add :
key:string *
value:Object -> unit
override Add :
key:string *
value:Object -> unit
public final function Add(
key : String,
value : Object
)
Parameters
- key
Type: System.String
The key to an object.
- value
Type: System.Object
A value that corresponds to the key.
Implements
IDictionary<TKey, TValue>.Add(TKey, TValue)
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | key is nulla null reference (Nothing in Visual Basic). |
ArgumentException | An element with the same key already occurs in the collection. |
.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.