MaskedTextProvider.VerifyEscapeChar(Char, Int32) 方法

定義

測試在指定位置上是否可以逸出指定的字元。

public:
 bool VerifyEscapeChar(char input, int position);
public bool VerifyEscapeChar (char input, int position);
member this.VerifyEscapeChar : char * int -> bool
Public Function VerifyEscapeChar (input As Char, position As Integer) As Boolean

參數

input
Char

要測試的 Char 值。

position
Int32

遮罩中要測試輸入字元的位置。

傳回

如果在指定位置可以逸出指定字元,則為 true,否則為 false

備註

如果字元是有效的輸入,但未指派給格式化字串中的該位置,則表示要 出字元。 逸出字元分為下列三個類別:

  • 如果 屬性為 trueAllowPromptAsInput則會逸出提示字元。

  • 如果輸入字元的值與遮罩中的常值相同,而且屬性為 true,則會SkipLiterals逸出。

  • 如果 屬性為 true,則會ResetOnSpace逸出空格符。

如果 pos 參數小於零或大於 LengthMask,方法VerifyEscapeChar也會傳回 false

適用於

另請參閱