次の方法で共有


DiscoveryExceptionDictionary.Contains(String) メソッド

定義

指定した URL の DiscoveryExceptionDictionaryException に格納されているかどうかを確認します。

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。

戻り値

指定した URL の DiscoveryExceptionDictionary が、Exception に格納されている場合は true。それ以外の場合は false

例外

urlnullです。

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

適用対象

こちらもご覧ください