DiscoveryClientDocumentCollection.Contains(String) Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Bepaalt of het DiscoveryClientDocumentCollection een object met de opgegeven URL bevat.
public:
bool Contains(System::String ^ url);
public bool Contains(string url);
member this.Contains : string -> bool
Public Function Contains (url As String) As Boolean
Parameters
- url
- String
De URL voor het document die moet worden gevonden in de DiscoveryClientDocumentCollection.
Retouren
trueals het DiscoveryClientDocumentCollection een object met de opgegeven URL bevat; anders. false
Uitzonderingen
url is null.
Voorbeelden
In het volgende codevoorbeeld wordt de Contains methode aangeroepen om te bepalen of het detectiedocument een lid bevat met de URL die is opgeslagen in de StringUrl variabele.
bool myContains = myDiscoveryClientDocumentCollection->Contains( myStringUrl );
if ( myContains )
Console::WriteLine( "The discovery document {0} is present in the Collection", myStringUrl );
bool myContains = myDiscoveryClientDocumentCollection.Contains(myStringUrl);
if (myContains)
Console.WriteLine("The discovery document {0} is present in the"
+ " Collection",myStringUrl);
Dim myContains As Boolean = myDiscoveryClientDocumentCollection.Contains(myStringUrl)
If myContains Then
Console.WriteLine("The discovery document {0} is present in the Collection", _
myStringUrl)
End If