DiscoveryClientReferenceCollection.Contains(String) Methode

Definition

Bestimmt, ob die DiscoveryClientReferenceCollection eine DiscoveryReference 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 für die DiscoveryReference, die in der DiscoveryClientReferenceCollection gesucht werden soll.

Gibt zurück

true, wenn die DiscoveryClientReferenceCollection eine DiscoveryReference mit der angegebenen URL enthält, andernfalls false.

Beispiele

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

Gilt für: