ComponentOne Input for WinForms
C1.Win.C1Input.4.5.2 Assembly / C1.Win.C1Input Namespace / C1TextBox Class / MaxLength Property

In This Topic
    MaxLength Property
    In This Topic
    Gets or sets the maximum number of characters or bytes that the control can hold.
    Public Shadows Property MaxLength As System.Integer
    public new MaxLength {get; set;}

    Property Value

    The number of characters or bytes (determined by the LengthAsByte property) that can be entered into the control.
    The default is zero.
    If value is less than zero, an ArgumentOutOfRangeException is thrown.
    The MaxLength property allows you to limit the number of characters a user can enter in the control. The default value is 0, which does not limit the number of characters. Any number greater than 0 indicates the maximum number of characters. The C1.Win.C1Input.MaxLengthUnit effects the displayed result along with the MaxLength property.
    See Also