MaxLengthAttribute 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 MaxLengthAttribute 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| MaxLengthAttribute() |
初始化 MaxLengthAttribute 類別的新執行個體。 |
| MaxLengthAttribute(Int32) |
根據參數MaxLengthAttribute初始化類別 |
MaxLengthAttribute()
初始化 MaxLengthAttribute 類別的新執行個體。
public:
MaxLengthAttribute();
public MaxLengthAttribute();
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Uses reflection to get the 'Count' property on types that don't implement ICollection. This 'Count' property may be trimmed. Ensure it is preserved.")]
public MaxLengthAttribute();
Public Sub New ()
- 屬性
備註
將使用資料庫所支援的最大允許長度。
適用於
MaxLengthAttribute(Int32)
根據參數MaxLengthAttribute初始化類別length的新實例。
public:
MaxLengthAttribute(int length);
public MaxLengthAttribute(int length);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Uses reflection to get the 'Count' property on types that don't implement ICollection. This 'Count' property may be trimmed. Ensure it is preserved.")]
public MaxLengthAttribute(int length);
new System.ComponentModel.DataAnnotations.MaxLengthAttribute : int -> System.ComponentModel.DataAnnotations.MaxLengthAttribute
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Uses reflection to get the 'Count' property on types that don't implement ICollection. This 'Count' property may be trimmed. Ensure it is preserved.")>]
new System.ComponentModel.DataAnnotations.MaxLengthAttribute : int -> System.ComponentModel.DataAnnotations.MaxLengthAttribute
Public Sub New (length As Integer)
參數
- length
- Int32
陣列或字串資料的最大允許長度。
- 屬性