WebServiceBindingAttribute Constructor (String, String)


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

Initializes a new instance of the WebServiceBindingAttribute class.

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

public WebServiceBindingAttribute(
	string name,
	string ns


Type: System.String

The name of the binding an XML Web service method is implementing an operation for. Sets the Name property.

Type: System.String

The namespace associated with the binding. Sets the Namespace property.

This constructor is used to specify a name for a binding defined in the XML Web service it is applied to that and is a member of the supplied namespace.

The following example specifies a binding named LocalBindingNonDefaultNamespace that is a member of the http://www.contoso.com/MyBinding namespace and defined in the BindingSample XML Web service.

.NET Framework
Available since 1.1
Return to top