Export (0) Print
Expand All

StringLengthAttribute.MaximumLength Property

Gets or sets the maximum length of a string.

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

public int MaximumLength { get; private set; }

Property Value

Type: System.Int32
The maximum length a string.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5 SP1

.NET Framework Client Profile

Supported in: 4

Portable Class Library

Supported in: Portable Class Library
© 2015 Microsoft