MetaColumn.MaxLength 屬性

定義

取得值,這個值表示可在資料欄位中儲存的最大資料長度。

public:
 property int MaxLength { int get(); };
public int MaxLength { get; }
member this.MaxLength : int
Public ReadOnly Property MaxLength As Integer

屬性值

Int32

可在資料欄位中儲存的最大資料長度。

備註

MaxLength屬性會驗證屬性 StringLengthAttribute 是否套用至資料欄位,並抓取屬性的值 MaximumLength 。 如果 StringLengthAttribute 屬性未套用至資料欄位, MaxLength 屬性會使用資料庫類型來取得允許的最大長度。

適用於

另請參閱