MaxLengthAttribute 构造函数

定义

初始化 MaxLengthAttribute 类的新实例。

重载

MaxLengthAttribute()

初始化 MaxLengthAttribute 类的新实例。

MaxLengthAttribute(Int32)

初始化基于 length 参数的 MaxLengthAttribute 类的新实例。

MaxLengthAttribute()

Source:
MaxLengthAttribute.cs
Source:
MaxLengthAttribute.cs
Source:
MaxLengthAttribute.cs

初始化 MaxLengthAttribute 类的新实例。

public:
 MaxLengthAttribute();
public MaxLengthAttribute ();
Public Sub New ()

注解

将使用数据库支持的最大允许长度。

适用于

MaxLengthAttribute(Int32)

Source:
MaxLengthAttribute.cs
Source:
MaxLengthAttribute.cs
Source:
MaxLengthAttribute.cs

初始化基于 length 参数的 MaxLengthAttribute 类的新实例。

public:
 MaxLengthAttribute(int length);
public MaxLengthAttribute (int length);
new System.ComponentModel.DataAnnotations.MaxLengthAttribute : int -> System.ComponentModel.DataAnnotations.MaxLengthAttribute
Public Sub New (length As Integer)

参数

length
Int32

数组或字符串数据的最大允许长度。

适用于