Share via


LengthRouteConstraint Constructor

 

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

Overload List

Name Description
System_CAPS_pubmethod LengthRouteConstraint(Int32)

System_CAPS_pubmethod LengthRouteConstraint(Int32, Int32)

Initializes a new instance of the LengthRouteConstraint class that constrains a route parameter to be a string of a given length.

See Also

LengthRouteConstraint Class
System.Web.Mvc.Routing.Constraints Namespace

Return to top

LengthRouteConstraint Constructor (Int32)

Syntax

public LengthRouteConstraint(
    int length
)
public:
LengthRouteConstraint(
    int length
)
new : 
        length:int -> LengthRouteConstraint
Public Sub New (
    length As Integer
)

Return to top

LengthRouteConstraint Constructor (Int32, Int32)

Initializes a new instance of the LengthRouteConstraint class that constrains a route parameter to be a string of a given length.

Syntax

public LengthRouteConstraint(
    int minLength,
    int maxLength
)
public:
LengthRouteConstraint(
    int minLength,
    int maxLength
)
new : 
        minLength:int *
        maxLength:int -> LengthRouteConstraint
Public Sub New (
    minLength As Integer,
    maxLength As Integer
)

Parameters

  • minLength
    Type: System.Int32

    The minimum length of the route parameter.

  • maxLength
    Type: System.Int32

    The maximum length of the route parameter.

Return to top