DiscoveryExceptionDictionary.Contains(String) Methode

Definition

Bestimmt, ob das DiscoveryExceptionDictionary eine Exception mit der angegebenen URL enthält.Determines whether the DiscoveryExceptionDictionary contains an Exception with the specified 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

Parameter

url
String

Die URL für die Exception, die im DiscoveryExceptionDictionary gesucht werden soll.The URL of the Exception to locate within the DiscoveryExceptionDictionary.

Gibt zurück

true, wenn das DiscoveryExceptionDictionary eine Exception mit der angegebenen URL enthält, andernfalls false.true if the DiscoveryExceptionDictionary contains an Exception with the specified URL; otherwise, false.

Ausnahmen

url ist null.url is null.

Beispiele

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

Gilt für:

Siehe auch