MaxLengthAttribute Constructor (Int32)

Initializes a new instance of the MaxLengthAttribute class.

Namespace:  System.ComponentModel.DataAnnotations
Assembly:  EntityFramework (in EntityFramework.dll)

Syntax

'Declaration
Public Sub New ( _
    length As Integer _
)
'Usage
Dim length As Integer

Dim instance As New MaxLengthAttribute(length)
public MaxLengthAttribute(
    int length
)
public:
MaxLengthAttribute(
    int length
)
new : 
        length:int -> MaxLengthAttribute
public function MaxLengthAttribute(
    length : int
)

Parameters

  • length
    Type: System.Int32
    The maximum allowable length of array/string data. Value must be greater than zero.

See Also

Reference

MaxLengthAttribute Class

MaxLengthAttribute Overload

System.ComponentModel.DataAnnotations Namespace