MaxLengthAttribute 构造函数

定义

初始化 MaxLengthAttribute 类的新实例。

重载

名称 说明
MaxLengthAttribute()

初始化 MaxLengthAttribute 类的新实例。

MaxLengthAttribute(Int32)

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

MaxLengthAttribute()

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

初始化 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)

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

基于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

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

属性

适用于