Compartir a través de


WebTestContext.Contains (Método)

Determina si WebTestContext contiene el par clave-valor especificado.

Espacio de nombres:  Microsoft.VisualStudio.TestTools.WebTesting
Ensamblado:  Microsoft.VisualStudio.QualityTools.WebTestFramework (en Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

Sintaxis

'Declaración
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

Parámetros

Valor devuelto

Tipo: System.Boolean
true si WebTestContext contiene el objeto KeyValuePair<TKey, TValue> específico; de lo contrario, false.

Implementaciones

ICollection<T>.Contains(T)

Comentarios

Esta es una buena prueba para determinar si KeyValuePair<TKey, TValue> ya se produce en la colección WebTestContext antes de usar el método Add.

Seguridad de .NET Framework

Vea también

Referencia

WebTestContext Clase

Microsoft.VisualStudio.TestTools.WebTesting (Espacio de nombres)