다음을 통해 공유


WebTestContext.Contains Method

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)

Syntax

'Declaration
Public Function Contains ( _
    keyValuePair As KeyValuePair(Of String, Object) _
) As Boolean
public bool Contains(
    KeyValuePair<string, Object> keyValuePair
)
public:
virtual bool Contains(
    KeyValuePair<String^, Object^> keyValuePair
) sealed
abstract Contains : 
        keyValuePair:KeyValuePair<string, Object> -> bool  
override Contains : 
        keyValuePair:KeyValuePair<string, Object> -> bool
public final function Contains(
    keyValuePair : KeyValuePair<String, Object>
) : boolean

Parameters

  • keyValuePair
    Type: KeyValuePair<String, Object>

    An object

Return Value

Type: Boolean
true if the WebTestContext contains the specific KeyValuePair object; otherwise, false.

Implements

ICollection.Contains(UTP)

Remarks

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

.NET Framework Security

See Also

Reference

WebTestContext Class

Microsoft.VisualStudio.TestTools.WebTesting Namespace