ServiceDescriptionCollection.GetBinding Method (XmlQualifiedName)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Searches the ServiceDescriptionCollection and returns the Binding 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 Binding GetBinding(
	XmlQualifiedName name


Type: System.Xml.XmlQualifiedName

An XmlQualifiedName whose Name property is used to retrieve a Binding instance.

Return Value

Type: System.Web.Services.Description.Binding

The binding with the specified name.

Exception Condition

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

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

// Get the Binding from the collection.
Binding myBinding = myCollection.GetBinding(myXmlQualifiedName);

.NET Framework
Available since 1.1
Return to top