DiscoveryExceptionDictionary.Contains(String) Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Bestimmt, ob die DiscoveryExceptionDictionary Datei eine Exception mit der angegebenen URL enthält.
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 der Exception zu suchenden Innerhalb der DiscoveryExceptionDictionary.
Gibt zurück
truewenn die DiscoveryExceptionDictionary enthält eine Exception mit der angegebenen URL; andernfalls . false
Ausnahmen
url ist null.
Beispiele
DiscoveryExceptionDictionary^ myExceptionDictionary = myDiscoveryClientProtocol2->Errors;
if ( myExceptionDictionary->Contains( myUrlKey ))
{
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))
{
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