Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DiscoveryClientDocumentCollection::Remove Method (String^)

 

Removes an object with the specified URL from the DiscoveryClientDocumentCollection.

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

public:
void Remove(
	String^ url
)

Parameters

url
Type: System::String^

The URL for the discovered document to remove from the DiscoveryClientDocumentCollection.

Exception Condition
ArgumentNullException

url is null.

The following code example removes the discovery document with a URL of http://www.contoso.com/service1.disco from the DiscoveryClientDocumentCollection.

DiscoveryClientDocumentCollection^ myDiscoveryClientDocumentCollection = gcnew DiscoveryClientDocumentCollection;

DiscoveryDocument^ myDiscoveryDocument = gcnew DiscoveryDocument;
String^ myStringUrl = "http://www.contoso.com/service.disco";
String^ myStringUrl1 = "http://www.contoso.com/service1.disco";
myDiscoveryClientDocumentCollection->Add( myStringUrl, myDiscoveryDocument );
myDiscoveryClientDocumentCollection->Add( myStringUrl1, myDiscoveryDocument );

myDiscoveryClientDocumentCollection->Remove( myStringUrl1 );

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft