MaskedTextBox::MaxLength Property
.NET Framework (current version)
Gets or sets the maximum number of characters the user can type or paste into the text box control. This property is not supported by MaskedTextBox.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: [BrowsableAttribute(false)] property int MaxLength { virtual int get() override; virtual void set(int value) override; }
See the Mask property and the Position property in the MaskInputRejectedEventArgs class for information about how to determine the maximum length of a string in a MaskedTextBox.
.NET Framework
Available since 2.0
Available since 2.0
Show: