次の方法で共有


DiscoveryClientReferenceCollection.Contains(String) メソッド

定義

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

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

DiscoveryReference 内で検索される DiscoveryClientReferenceCollection の URL。

戻り値

指定した URL の DiscoveryClientReferenceCollectionDiscoveryReference に含まれている場合は true。それ以外の場合は false

String^ myStringUrl1 = "http://localhost/dataservice.disco";
if ( myDiscoveryClientReferenceCollection->Contains( myStringUrl1 ) )
{
   Console::WriteLine( "The document reference {0} is part of the  collection.", myStringUrl1 );
}
string myStringUrl1 = "http://localhost/dataservice.disco";
if (myDiscoveryClientReferenceCollection.Contains(myStringUrl1))
{
    Console.WriteLine("The document reference {0} is part of the"
        + " collection.", myStringUrl1);
}
Dim myStringUrl1 As String = "http://localhost/dataservice.disco"
If myDiscoveryClientReferenceCollection.Contains(myStringUrl1) Then
    Console.WriteLine("The document reference {0} is part of the" + _
    " collection.", myStringUrl1)
End If

適用対象