DiscoveryClientDocumentCollection::Contains Method (String^)

 

Determines if the DiscoveryClientDocumentCollection contains an object with the specified URL.

Namespace:   System.Web.Services.Discovery
Assembly:  System.Web.Services (in System.Web.Services.dll)

public:
bool Contains(
	String^ url
)

Parameters

url
Type: System::String^

The URL for the document to locate within the DiscoveryClientDocumentCollection.

Return Value

Type: System::Boolean

true if the DiscoveryClientDocumentCollection contains an object with the specified URL; otherwise, false.

Exception Condition
ArgumentNullException

url is null.

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 );

.NET Framework
Available since 1.1
Return to top
Show: