'Declaration Protected Overridable Function GetMaskCharacters() As Char()
'Usage Dim instance As MaskedTextBox Dim value() As Char value = instance.GetMaskCharacters()
protected virtual char[] GetMaskCharacters()
'Declaration Protected Overridable Function GetMaskCharacters() As Char()
'Usage Dim instance As MaskedTextBox Dim value() As Char value = instance.GetMaskCharacters()
protected virtual char[] GetMaskCharacters()
The following table provides a list of the supported mask characters:
Mask character
Description
Importance
0
Digit. Any single digit between 0 and 9 inclusively.
Required
9
Digit or space.
Optional
#
Digit or space. If this position is blank in the mask, it will be rendered as a space. Plus (+) and minus (-) signs are allowed.
L
Letter. Restricts input to the ASCII letters a-z and A-Z.
Required
?
Letter. Restricts input to the ASCII letters a-z and A-Z
Optional
&
Character. If the RestrictToAscii property is set to true, this character will behave like the "L" character.
Required
C
Character. Any non-control character. If the RestrictToAscii property is set to true, this character will behave like the "?" character.
Optional
A
Alphanumeric. If the RestrictToAscii property is set to true, input will be restricted to the ASCII letters a-z and A-Z.
Optional
a
Alphanumeric. If the RestrictToAscii property is set to true, input will be restricted to the ASCII letters a-z and A-Z.
Optional
.
Decimal placeholder. The actual character will be the decimal symbol appropriate to the format provider.
N/A
,
Thousands placeholder. The actual character will be the thousands symbol appropriate to the format provider.
N/A
:
Time separator. The actual character will be the time separator appropriate to the format provider.
N/A
/
Date separator. The actual character will be the date separator appropriate to the format provider.
N/A
$
Currency symbol. The actual character will be the currency symbol appropriate to the format provider.
N/A
<
Shift down. Converts all following characters to lower case.
N/A
>
Shift up. Converts all following characters to upper case.
N/A
|
Disable a previous shift up or down.
N/A
\
Escape. Converts a mask character into a literal.
N/A
All others
Literals
N/A
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Framework: net20, net35, net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.