Freigeben über


WebTestContext.Contains-Methode

Ermittelt, ob WebTestContext das angegebene Schlüssel-Wert-Paar enthält.

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

Parameter

Rückgabewert

Typ: System.Boolean
true , wenn WebTestContext das spezifische KeyValuePair<TKey, TValue> enthält, andernfalls false.

Implementiert

ICollection<T>.Contains(T)

Hinweise

Ein hilfreicher Test, mit dem Sie vor Verwendung der Add-Methode ermitteln können, ob ein KeyValuePair<TKey, TValue> bereits in der WebTestContext-Auflistung vorhanden ist.

.NET Framework-Sicherheit

Siehe auch

Referenz

WebTestContext Klasse

Microsoft.VisualStudio.TestTools.WebTesting-Namespace