TextBox.MaxLength 屬性

定義

取得或設定值,指定使用者輸入允許的最大字元數。

public:
 property int MaxLength { int get(); void set(int value); };
int MaxLength();

void MaxLength(int value);
public int MaxLength { get; set; }
var int32 = textBox.maxLength;
textBox.maxLength = int32;
Public Property MaxLength As Integer
<TextBox MaxLength="int"/>

屬性值

Int32

int

使用者輸入允許的最大字元數。 預設值為 0 (沒有限制) 。

備註

MaxLength 值為 0 指定使用者輸入允許的字元數目沒有限制。

適用於