MaxLengthAttribute 建構函式

定義

初始化 MaxLengthAttribute 類別的新執行個體。

多載

名稱 Description
MaxLengthAttribute()

初始化 MaxLengthAttribute 類別的新執行個體。

MaxLengthAttribute(Int32)

根據參數length初始化類別MaxLengthAttribute的新實例。

MaxLengthAttribute()

初始化 MaxLengthAttribute 類別的新執行個體。

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

備註

將使用資料庫所支援的最大允許長度。

適用於

MaxLengthAttribute(Int32)

根據參數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

陣列或字串資料的最大允許長度。

適用於