ServiceDescriptionCollection.GetService Method (XmlQualifiedName)


Searches the ServiceDescriptionCollection and returns the Service with the specified name that is a member of one of the ServiceDescription instances contained in the collection.

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

public Service GetService(
	XmlQualifiedName name


Type: System.Xml.XmlQualifiedName

The XmlQualifiedName, passed by reference, whose Name property is shared by the Service returned.

Return Value

Type: System.Web.Services.Description.Service

The service with the specified name.

Exception Condition

The specified Service is not a member of any ServiceDescription instances within the collection.

// Construct an XML qualified name.
XmlQualifiedName myXmlQualifiedName = 
   new XmlQualifiedName("MathService", "");

// Get the Service from the collection.
Service myService = myCollection.GetService(myXmlQualifiedName);

.NET Framework
Available since 1.1
Return to top