HttpMethodConstraint Constructor (array<String^>^)

 

Initializes a new instance of the HttpMethodConstraint class by using the HTTP verbs that are allowed for the route.

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

public:
HttpMethodConstraint(
	... array<String^>^ allowedMethods
)

Parameters

allowedMethods
Type: array<System::String^>^

The HTTP verbs that are valid for the route.

Exception Condition
ArgumentNullException

The allowedMethods parameter is null.

The following example shows a Route object whose Constraints property contains an item that has a key named httpMethod and that has a value that is an instance of the HttpMethodConstraint class.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.5
Return to top
Show: