WebTestContext.Add Method (KeyValuePair<String, Object>)

Adds a KeyValuePair 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: KeyValuePair<String, Object>

    The object to add.

Implements

ICollection.Add(UTP)

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

See Also

Reference

WebTestContext Class

Add Overload

Microsoft.VisualStudio.TestTools.WebTesting Namespace