'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
Target Platforms: Windows 11, Windows, 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2