Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WebTestContext::Contains Method (KeyValuePair<String^, Object^>)

 

Determines whether the WebTestContext contains the specified key/value pair.

Namespace:   Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

public:
virtual bool Contains(
	KeyValuePair<String^, Object^> keyValuePair
) sealed

Parameters

keyValuePair
Type: System.Collections.Generic::KeyValuePair<String^, Object^>

An object

Return Value

Type: System::Boolean

true if the WebTestContext contains the specific KeyValuePair<TKey, TValue> object; otherwise, false.

This is a good test to determine whether a KeyValuePair<TKey, TValue> already occurs in the WebTestContext collection before you use the Add method.

Return to top
Show: