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.
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)
Syntax
'Declaration
Public Function ContainsKey ( _
key As String _
) As Boolean
public bool ContainsKey(
string key
)
public:
virtual bool ContainsKey(
String^ key
) sealed
abstract ContainsKey :
key:string -> bool
override ContainsKey :
key:string -> bool
public final function ContainsKey(
key : String
) : boolean
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.
Implements
IDictionary<TKey, TValue>.ContainsKey(TKey)
Remarks
This is a good test to determine whether a KeyValuePair<TKey, TValue> already occurs in the WebTestContext collection before you use the Add method.
.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.