ServiceDescriptionCollection.GetBinding Method (XmlQualifiedName)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com 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
)

Parameters

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
Exception

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

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

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

.NET Framework
Available since 1.1
Return to top
Show: