WebTestContext.Add Method (KeyValuePair<String, Object>)
Adds a KeyValuePair<TKey, TValue> object to the WebTestContext.
Namespace: Microsoft.VisualStudio.TestTools.WebTesting
Assembly: Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)
Syntax
'Declaration
Public Sub Add ( _
keyValuePair As KeyValuePair(Of String, Object) _
)
public void Add(
KeyValuePair<string, Object> keyValuePair
)
public:
virtual void Add(
KeyValuePair<String^, Object^> keyValuePair
) sealed
abstract Add :
keyValuePair:KeyValuePair<string, Object> -> unit
override Add :
keyValuePair:KeyValuePair<string, Object> -> unit
public final function Add(
keyValuePair : KeyValuePair<String, Object>
)
Parameters
- keyValuePair
Type: System.Collections.Generic.KeyValuePair<String, Object>
The object to add.
Implements
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | key of the keyValuePair 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.