\转义.转义掩码字符,
将其转化为文字. "\\
"是
反斜杠的转义序列.
\ Escape. Escapes a mask character,
turning it into a literal. "\\
" is the
escape sequence for a backslash.
因此,%符号的掩码为\%
So the mask for a % sign is \%
发布之前,我制作了一个快速且肮脏的winforms应用程序,对其进行了尝试并成功运行.
Before posting, I made up a quick and dirty winforms app, tried it and it works.
编辑-已添加,尽管文档中的下一项使它看起来像是直接的%符号也可以在没有反斜杠的情况下工作,所以我尝试了一下,并且效果也很好.
Edit - added although this next item in the documentation makes it look like just a straight % sign should work without the backslash, so I tried it and it works as well.
所有其他字符文字.全部
非遮罩元素将显示为
自己在MaskedTextBox中.
文字总是占据静态的
在运行时将其放置在面罩中,以及
不能被移动或删除
用户.
All other characters Literals. All
non-mask elements will appear as
themselves within MaskedTextBox.
Literals always occupy a static
position in the mask at run time, and
cannot be moved or deleted by the
user.