Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

MaxLengthAttribute Constructor (Int32)

.NET Framework 4.6 and 4.5

Initializes a new instance of the MaxLengthAttribute class based on the length parameter.

Namespace:  System.ComponentModel.DataAnnotations
Assemblies:   System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)
  System.ComponentModel.Annotations (in System.ComponentModel.Annotations.dll)

public MaxLengthAttribute(
	int length
)

Parameters

length
Type: System.Int32

The maximum allowable length of array or string data.

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft