Sdílet prostřednictvím


DiscoveryExceptionDictionary.Contains(String) Metoda

Definice

Určuje, zda obsahuje DiscoveryExceptionDictionary objekt se zadanou Exception adresou URL.

public:
 bool Contains(System::String ^ url);
public bool Contains (string url);
member this.Contains : string -> bool
Public Function Contains (url As String) As Boolean

Parametry

url
String

Adresa URL objektu, který Exception se má vyhledat v objektu DiscoveryExceptionDictionary.

Návraty

true pokud objekt DiscoveryExceptionDictionary obsahuje se zadanou Exception adresou URL, v opačném případě falsehodnotu .

Výjimky

url je null.

Příklady

DiscoveryExceptionDictionary^ myExceptionDictionary = myDiscoveryClientProtocol2->Errors;
if ( myExceptionDictionary->Contains( myUrlKey ) == true )
{
   Console::WriteLine( "'myExceptionDictionary' contains a discovery exception for the key '{0}'", myUrlKey );
}
else
{
   Console::WriteLine( "'myExceptionDictionary' does not contain a discovery exception for the key '{0}'", myUrlKey );
}
DiscoveryExceptionDictionary myExceptionDictionary
                             = myDiscoveryClientProtocol2.Errors;
if ( myExceptionDictionary.Contains(myUrlKey) == true )
{
   Console.WriteLine("'myExceptionDictionary' contains " +
             " a discovery exception for the key '" + myUrlKey + "'");
}
else
{
   Console.WriteLine("'myExceptionDictionary' does not contain" +
             " a discovery exception for the key '" + myUrlKey + "'");
}
Dim myExceptionDictionary As DiscoveryExceptionDictionary = myDiscoveryClientProtocol2.Errors
If myExceptionDictionary.Contains(myUrlKey) = True Then
   Console.WriteLine("'myExceptionDictionary' contains " + _
        "a discovery exception for the key '" + myUrlKey + "'")
Else
   Console.WriteLine("'myExceptionDictionary' does not contain" + _
        " a discovery exception for the key '" + myUrlKey + "'")
End If

Platí pro

Viz také