ServiceCollection.Item Property (String)

Gets a Service specified by its name.

Namespace: System.Web.Services.Description
Assembly: System.Web.Services (in system.web.services.dll)

public:
property Service^ default [String^] {
	Service^ get (String^ name);
}
/** @property */
public Service get_Item (String name)

Not applicable.

Parameters

name

The name of the Service returned.

Property Value

A Service.

// Create a new XmlTextWriter with specified URL.
XmlTextReader^ myXmlReader = gcnew XmlTextReader( "All_CS.wsdl" );
ServiceDescription^ myServiceDescription = ServiceDescription::Read( myXmlReader );
myServiceDescription->TargetNamespace = "http://tempuri.org/";

// Remove the service named MathService.
ServiceCollection^ myServiceDescriptionCollection = myServiceDescription->Services;
myServiceDescriptionCollection->Remove( myServiceDescription->Services[ "MathService" ] );

// Create a new XmlTextWriter with specified URL.
XmlTextReader myXmlReader = new XmlTextReader("All_JSL.wsdl");
ServiceDescription myServiceDescription = 
    ServiceDescription.Read(myXmlReader);
myServiceDescription.set_TargetNamespace("http://tempuri.org/");
// Remove the service named MathService.
ServiceCollection myServiceDescriptionCollection = 
    myServiceDescription.get_Services();
myServiceDescriptionCollection.Remove(myServiceDescription.
    get_Services().get_Item("MathService"));

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: