다음을 통해 공유


DiscoveryExceptionDictionary.Contains(String) 메서드

정의

DiscoveryExceptionDictionary에 지정된 URL을 가진 Exception이 포함되어 있는지 여부를 확인합니다.

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

매개 변수

url
String

Exception 내에서 찾을 DiscoveryExceptionDictionary의 URL입니다.

반환

Boolean

DiscoveryExceptionDictionary에 지정된 URL을 가진 Exception이 포함되어 있으면 true이고, 그렇지 않으면 false입니다.

예외

url이(가) null인 경우

예제

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

적용 대상

추가 정보