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::ContainsKey Method (String^)

 

Determines whether the WebTestContext contains an element with the specified key.

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

public:
virtual bool ContainsKey(
	String^ key
) sealed

Parameters

key
Type: System::String^

The key to look up in collection.

Return Value

Type: System::Boolean

true if the key occurs in the collection; 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: