DiscoveryClientDocumentCollection.Contains(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines if the DiscoveryClientDocumentCollection contains an object with the specified URL.
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
The URL for the document to locate within the DiscoveryClientDocumentCollection.
Returns
true
if the DiscoveryClientDocumentCollection contains an object with the specified URL; otherwise, false
.
Exceptions
url
is null
.
Examples
The following code example calls the Contains method to determine if the discovery document contains a member with the URL stored in the StringUrl
variable.
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