System 2.0.0.0 4.0.0.0 System.Object System.ICloneable

The control contains a mask, composed of literal characters and formatting elements, that it tests all user input against. Instead of permanently associating a specific mask-parsing engine with , Windows Forms provides it as a separate service, represented by the class, which defines the syntax of the masking language discussed in the documentation for the property.

Many of the members of the class refer their implementation to similarly named members of the associated . For example, the property of the class refers all access to the of the class.

The mask-parsing engine used by is modeled after the Masked Edit control included in Microsoft Visual Basic version 6. Its masking language is described in the documentation for the property.

The following three distinct strings are involved with the class.

String name

Description

Input character or string

Represents the characters used as input that the mask is applied against. In actuality, the input string may be composed of multiple input operations, including , , , and . Therefore, the input string cannot be accessed directly. However, aspects of the input string handling are available though the and , , and properties.

Mask

Represents the input formatting mask used to transform the input string into the formatted string. This string is set in the and accessed primarily though the property. Characteristics of the mask are also available through other members, such as the , , and properties.

Formatted string

Represents the string that results when the full mask is applied to the input string. The formatted string can be queried with many members of the class, including , , , , , , and so on. The full value of the formatted string is available from the and methods.

The input string may represent direct user input, as in the case of the , or may be generated by other processes not directly associated with user input/output operations.

Represents a mask-parsing service that can be used by any number of controls that support masking, such as the control.

- Constructor
  2.0.0.0
  4.0.0.0

  Use of this constructor is exactly equivalent to the following call to the constructor:

  MaskedTextProvider(mask , null, true, '_', '\0', false)

  Initializes a new instance of the class using the specified mask.

  A that represents the input mask.
- Constructor
  2.0.0.0
  4.0.0.0

  Use of this constructor is exactly equivalent to the following call to the constructor:

  MaskedTextProvider(mask , null, true, '_', '\0', restrictToASCII)

  Initializes a new instance of the class using the specified mask and ASCII restriction value.

  A that represents the input mask.
  true to restrict input to ASCII-compatible characters; otherwise false to allow the entire Unicode set.
- Constructor
  2.0.0.0
  4.0.0.0

  Use of this constructor is exactly equivalent to the following call to the constructor:

  MaskedTextProvider(mask , culture, true, '_', '\0', false)

  Initializes a new instance of the class using the specified mask and culture.

  A that represents the input mask.
  A that is used to set region-sensitive separator characters.
- Constructor
  2.0.0.0
  4.0.0.0

  Use of this constructor is exactly equivalent to the following call to the constructor:

  MaskedTextProvider(mask , null, allowPromptAsInput, '_', passwordChar, false)

  Initializes a new instance of the class using the specified mask, password character, and prompt usage value.

  A that represents the input mask.
  A that will be displayed for characters entered into a password string.
  true to allow the prompt character as input; otherwise false.
- Constructor
  2.0.0.0
  4.0.0.0

  Use of this constructor is exactly equivalent to the following call to the constructor:

  MaskedTextProvider(mask , culture, true, '_', '\0', restrictToAscii)

  Initializes a new instance of the class using the specified mask, culture, and ASCII restriction value.

  A that represents the input mask.
  A that is used to set region-sensitive separator characters.
  true to restrict input to ASCII-compatible characters; otherwise false to allow the entire Unicode set.
- Constructor
  2.0.0.0
  4.0.0.0

  Use of this constructor is exactly equivalent to the following call to the constructor:

  MaskedTextProvider(mask , culture, allowPromptAsInput, '_', passwordChar, false)

  Initializes a new instance of the class using the specified mask, culture, password character, and prompt usage value.

  A that represents the input mask.
  A that is used to set region-sensitive separator characters.
  A that will be displayed for characters entered into a password string.
  true to allow the prompt character as input; otherwise false.
- Constructor
  2.0.0.0
  4.0.0.0

  This constructor represents the most general overloaded form. The parameter must conform to the masking language defined by the class, which is detailed in the property of the class.

  Because neutral cultures cannot be queried for culture-specific information, the constructor will use the method to search for the first non-neutral culture to use to determine the proper separator characters.

  Initializes a new instance of the class using the specified mask, culture, prompt usage value, prompt character, password character, and ASCII restriction value.

  A that represents the input mask.
  A that is used to set region-sensitive separator characters.
  A value that specifies whether the prompt character should be allowed as a valid input character.
  A that will be displayed as a placeholder for user input.
  A that will be displayed for characters entered into a password string.
  true to restrict input to ASCII-compatible characters; otherwise false to allow the entire Unicode set.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  The method adds the character value to the first available position in the formatted string after the position that was last assigned, which is represented by the property. This method will fail for any of the following reasons:

  The input value, , is not printable, or it does not match its corresponding mask element.

  There are zero available edit positions in the formatted string, or there are no available edit positions after the last assigned position.

  Adds the specified input character to the end of the formatted string.

  true if the input character was added successfully; otherwise false.

  A value to be appended to the formatted string.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  The method adds the characters from the string to the formatted string, starting with the first available position after . This method will fail for any of the following reasons:

  Any of the characters in the input value, , are not printable, or the input value does not match its corresponding mask element.

  There are not enough available edit positions in the formatted string after the last assigned position.

  If this method fails, no additions are made and the method returns false.

  Adds the characters in the specified input string to the end of the formatted string.

  true if all the characters from the input string were added successfully; otherwise false to indicate that no characters were added.

  A containing character values to be appended to the formatted string.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` To be added. To be added. To be added. To be added. To be added. To be added.
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  The property's value is set in the constructor.

  Even when is true, the prompt character must be valid for the current location in the mask in order to be accepted.

  Gets a value indicating whether the prompt character should be treated as a valid input character or not.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  The property's value is set in the constructor.

  If true, restricts user input to the ASCII character set.

  Gets a value indicating whether the mask accepts characters outside of the ASCII character set.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  The total number of editable character positions, represented by the property, should equal the sum of the and the properties.

  Gets the number of editable character positions that have already been successfully assigned an input value.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  The total number of editable character positions, represented by the property, should equal the sum of the and the properties.

  Gets the number of editable character positions in the input mask that have not yet been assigned an input value.

- Method
  2.0.0.0
  4.0.0.0
  System.Void

  The method reinitializes the formatted string, inserting the prompt character into all editable positions.

  Clears all the editable input characters from the formatted string, replacing them with prompt characters.

- Method
  2.0.0.0
  4.0.0.0
  System.Void `` To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Object

  The method returns a new copy of the current .

  Creates a copy of the current .

  The object this method creates, cast as an object.

- Property
  2.0.0.0
  4.0.0.0
  System.Globalization.CultureInfo To be added.

  The property is set in the constructor.

  Gets the culture that determines the value of the localizable separators and placeholders in the input mask.

- Property
  2.0.0.0
  4.0.0.0
  System.Char To be added.

  The property is defined in the class to be the asterisk character (*).

  Gets the default password character used obscure user input.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  The total number of editable character positions, represented by the property, must equal the sum of the and the properties. This value includes both the required and the optional editable characters.

  Gets the number of editable positions in the formatted string.

- Property
  2.0.0.0
  4.0.0.0
  System.Collections.IEnumerator To be added.

  On every access of the property, a temporary collection of editable positions is created that the retrieved operates on.

  This collection is read-only.

  Gets a newly created enumerator for the editable positions in the formatted string.

- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` ``

  The formatted string is composed of editable characters and literals copied from the mask. The editable character positions will either be occupied by the prompt character copied from the mask if they are unassigned, or with a valid input character if they have been assigned an input.

  The method is used to search for the first assigned character after a specified position and search direction. The result can subsequently be passed as a parameter to the indexer to obtain the assigned value at this position.

  The and methods are complements of this method.

  Returns the position of the first assigned editable position after the specified position using the specified search direction.

  If successful, an representing the zero-based position of the first assigned editable position encountered; otherwise .

  The zero-based position in the formatted string to start the search. A indicating the search direction; either true to search forward or false to search backward.
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` ``

  The formatted string is composed of editable characters and literals copied from the mask. The editable character positions will either be occupied by the prompt character copied from the mask if they are unassigned, or with a valid input character if they have been assigned an input.

  The method is used to search for the first assigned character between two specified positions, inclusive, using the specified search direction. The result can subsequently be passed as a parameter to the indexer to obtain the assigned value at this position.

  The and methods are complements of this method.

  Returns the position of the first assigned editable position between the specified positions using the specified search direction.

  If successful, an representing the zero-based position of the first assigned editable position encountered; otherwise .

  The zero-based position in the formatted string where the search starts. The zero-based position in the formatted string where the search ends. A indicating the search direction; either true to search forward or false to search backward.
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` ``

  The method is used to search for the next assigned or unassigned editable position in the formatted string after the specified position.

  The method is the complement of this method.

  Returns the position of the first editable position after the specified position using the specified search direction.

  If successful, an representing the zero-based position of the first editable position encountered; otherwise .

  The zero-based position in the formatted string to start the search. A indicating the search direction; either true to search forward or false to search backward.
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` ``

  The method is used to search for the first editable character between two specified positions, inclusive, using the specified search direction. The result can subsequently be passed as a parameter to the indexer to obtain the assigned value at this position.

  The method is the complement of this method.

  Returns the position of the first editable position between the specified positions using the specified search direction.

  If successful, an representing the zero-based position of the first editable position encountered; otherwise .

  The zero-based position in the formatted string where the search starts. The zero-based position in the formatted string where the search ends. A indicating the search direction; either true to search forward or false to search backward.
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` ``

  The method is used to search for the next literal character in the formatted string after the specified position. The result can subsequently be passed as a parameter to the indexer to obtain the literal value at this position.

  The method is the complement of this method.

  Returns the position of the first non-editable position after the specified position using the specified search direction.

  If successful, an representing the zero-based position of the first literal position encountered; otherwise .

  The zero-based position in the formatted string to start the search. A indicating the search direction; either true to search forward or false to search backward.
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` ``

  The method is used to search for the first literal character between two specified positions, inclusive, using the specified search direction. The result can subsequently be passed as a parameter to the indexer to obtain the literal value at this position.

  The method is the complement of this method.

  Returns the position of the first non-editable position between the specified positions using the specified search direction.

  If successful, an representing the zero-based position of the first literal position encountered; otherwise .

  The zero-based position in the formatted string where the search starts. The zero-based position in the formatted string where the search ends. A indicating the search direction; either true to search forward or false to search backward.
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` ``

  The formatted string is composed of editable characters and literals copied from the mask. The editable character positions will either be occupied by the prompt character copied from the mask if they are unassigned, or with a valid input character if they have been assigned an input.

  The method is used to search for the first unassigned character after a specified position and search direction. The prompt character should occupy this position.

  The and methods are complements of this method.

  Returns the position of the first unassigned editable position after the specified position using the specified search direction.

  If successful, an representing the zero-based position of the first unassigned editable position encountered; otherwise .

  The zero-based position in the formatted string to start the search. A indicating the search direction; either true to search forward or false to search backward.
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` ``

  The formatted string is composed of editable characters and literals copied from the mask. The editable character positions will either be occupied by the prompt character copied from the mask if they are unassigned, or with a valid input character if they have been assigned an input.

  The method is used to search for the first unassigned character between two specified positions, inclusive, using the specified search direction. The prompt character should occupy this position.

  The and methods are complements of this method.

  Returns the position of the first unassigned editable position between the specified positions using the specified search direction.

  If successful, an representing the zero-based position of the first unassigned editable position encountered; otherwise .

  The zero-based position in the formatted string where the search starts. The zero-based position in the formatted string where the search ends. A indicating the search direction; either true to search forward or false to search backward.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  The following methods of the class contain a parameter of type that is used to output information about the operation of the method: , , , , , , , , and . The method interprets this value and returns a Boolean value that indicates whether the has signaled that the operation was a success or failure.

  Determines whether the specified denotes success or failure.

  true if the specified value represents a success; otherwise, false if it represents failure.

  A value typically obtained as an output parameter from a previous operation.
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  The and properties will determine whether prompt and literal characters appear when calling the method. By setting both of these properties to false, the parsed string will represent only the characters entered by the user.

  Gets or sets a value that indicates whether literal characters in the input mask should be included in the formatted string.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  The and properties will determine whether prompt and literal characters appear when calling the method. By setting both of these properties to false, the parsed string will represent only the characters entered by the user.

  Gets or sets a value indicating whether is used to represent the absence of user input when displaying the formatted string.

- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  The method inserts a character into the first edit position at or beyond that specified by the parameter. This method will shift all existing characters after the insertion point over by one position to make room for the inserted character. If one of the following errors occurs, the insertion is not performed, and the method returns false.

  The parameter is less than zero or greater than the of the formatted string.

  An editable character was not found in the formatted string at or beyond the specified position, .

  The insertion character, , is not a valid input character because it is not printable or does not match its corresponding mask element.

  There are no available positions to the right of the insertion point, so that existing characters cannot be shifted.

  Shifting the existing characters would produce a violation of the mask.

  An empty string will cause no change in the formatted string, but will return true.

  Inserts the specified character at the specified position within the formatted string.

  true if the insertion was successful; otherwise, false.

  The to be inserted. The zero-based position in the formatted string to insert the character.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  The method inserts each character from the string into the edit positions located at position and beyond. This method will shift all existing characters after the insertion point over by one position for each inserted character. If one of the following errors occurs, no insertion is performed, and the method returns false.

  The parameter is less than zero or greater than the of the formatted string.

  Not enough editable characters exist in the formatted string at or beyond the specified position, , to insert all of the characters from the string.

  One or more of the insertion characters are not a valid input character because they are not printable or do not match their corresponding mask element.

  There are not enough available positions to the right of the insertion point, so that existing characters cannot be shifted.

  Shifting the existing characters would produce a violation of the mask. Note that this shifting occurs during the insertion of each individual character.

  An empty string will cause no change in the formatted string, but will return true.

  Inserts the specified string at a specified position within the formatted string.

  true if the insertion was successful; otherwise, false.

  The to be inserted. The zero-based position in the formatted string to insert the input string.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  The property is used to represent a result that is not valid for indexing operations, such as the method.

  When you use the provider or implement your own, you should use this property to decide if an index is invalid, rather than hard-coding knowledge of invalid values.

  Gets the upper bound of the range of invalid indexes.

- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  The method returns true only if all of the following conditions are true:

  The parameter is within the bounds of the formatted string; that is, its value is greater than or equal to zero and less than the of the formatted string.

  The specified position is an editable character.

  A character has not already been assigned to this position.

  Determines whether the specified position is available for assignment.

  true if the specified position in the formatted string is editable and has not been assigned to yet; otherwise false.

  The zero-based position in the mask to test.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  The method returns true only if both of the following conditions are true:

  The parameter is within the bounds of the formatted string; that is, its value is greater than or equal to zero and less than the of the formatted string.

  The specified position is an editable character.

  Determines whether the specified position is editable.

  true if the specified position in the formatted string is editable; otherwise false.

  The zero-based position in the mask to test.
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  Password protection can be initiated using one of the following two ways:

  Setting the property to a non-null value.

  Setting the property to true., which also sets the property to the value.

  is used by the and methods to determine whether to reveal the actual input characters or obscure them with .

  Gets or sets a value that determines whether password protection should be applied to the formatted string.

- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  Valid input characters include all printable characters, which include letters, digits, punctuation, symbols and the space character.

  Determines whether the specified character is a valid input character.

  true if the specified character contains a valid input value; otherwise false.

  The value to test.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  Valid mask characters include all printable characters, which include letters, digits, punctuation, symbols and the space character.

  Determines whether the specified character is a valid mask character.

  true if the specified character contains a valid mask value; otherwise false.

  The value to test.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  Valid password characters include all printable characters and the null character, which is used to disable password functionality. Printable characters include letters, digits, punctuation, symbols and the space character.

  Determines whether the specified character is a valid password character.

  true if the specified character contains a valid password value; otherwise false.

  The value to test.
- Property
  2.0.0.0
  4.0.0.0
  System.Char `` To be added. To be added. To be added. To be added.
- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  The property represents the farthest edit position in the mask, relative to the origin, that has been assigned an input character. For languages read left-to-right (LTR), such as English, this is the rightmost assigned position; for languages read right-to-left (RTL), this would be the leftmost position.

  Gets the index in the mask of the rightmost input character that has been assigned to the mask.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  The property represents the total number of characters in the mask, including both the literal and editable characters. The number of literal characters can be determined by subtracting the value of the from the .

  also describes the length of the formatted string, including input characters, literals, and prompt characters.

  Gets the length of the mask, absent any mask modifier characters.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The property is set in the constructor. This mask must contain only valid characters as defined by the masking language.

  Gets the input mask.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  The property checks only required input elements. To determine whether all required and optional input elements have been entered, use the property of the class instead.

  The current value of the property determines which formatting elements are considered required and which are optional.

  Gets a value indicating whether all required inputs have been entered into the formatted string.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  To verify if only required input elements have been entered, use the property instead. The current value of the property determines which formatting elements are considered required and which are optional.

  Gets a value indicating whether all required and optional inputs have been entered into the formatted string.

- Property
  2.0.0.0
  4.0.0.0
  System.Char To be added.

  For sensitive user input, it is common practice to conceal the actual information entered by the user during output operations. If the property is set to a non-null character, output methods such as and will obscure the input characters with the specified password character. Setting this property to null will disable password protection functionality.

  Gets or sets the character to be substituted for the actual input characters.

- Property
  2.0.0.0
  4.0.0.0
  System.Char To be added.

  The property represents the prompt character that is used by the and methods to represent the current state of the formatted input string. A prompt character is placed in editable positions that have not yet been assigned an input value. Some versions of the method also depend on the value of the property.

  Gets or sets the character used to represent the absence of user input for all available edit positions.

- Method
  2.0.0.0
  4.0.0.0
  System.Boolean

  The method has no effect if there are no characters assigned to the mask yet.

  When the last assigned character is removed from the formatted string, the editable mask character is reset for that position, allowing subsequent input.

  Removes the last assigned character from the formatted string.

  true if the character was successfully removed; otherwise, false.

- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` To be added. To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  The method has no effect if there are no assigned characters at the removal position specified. Literal characters are not affected by this method.

  When a character is removed, the remaining higher-positioned characters in the mask will shift to the left to fill in the gap created by the removal. Vacated positions are reset for input. If movement of the characters is prevented by the mask definition, no removal occurs, and returns false.

  This method call is exactly equivalent to the following call to the overloaded version:

  RemoveAt(pos, pos);

  Removes the assigned character at the specified position from the formatted string.

  true if the character was successfully removed; otherwise, false.

  The zero-based position of the assigned character to remove.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  The method has no effect if there are no assigned characters at the removal positions specified.

  When a character is removed, the remaining higher-positioned characters in the mask will shift to the left to fill in the gap created by the removal. Vacated positions are reset for input. If movement of the characters is prevented by the mask definition, no removal occurs, and returns false.

  Removes the assigned characters between the specified positions from the formatted string.

  true if the character was successfully removed; otherwise, false.

  The zero-based index of the first assigned character to remove. The zero-based index of the last assigned character to remove.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  The method searches for the first editable position in the formatted string at or beyond the specified position, . If one is found, the value of the editable position is changed to the specified character, . Any of the following conditions will result in an error that causes no replacement to be performed and a value of false to be returned:

  The parameter is less than zero or greater than the of the formatted string.

  An editable character was not found in the formatted string at or beyond the specified position, .

  The replacement character, , is not a valid input character because it is not printable or does not match its corresponding mask element.

  Replaces a single character at or beyond the specified position with the specified character value.

  true if the character was successfully replaced; otherwise, false.

  The value that replaces the existing value. The zero-based position to search for the first editable character to replace.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  The method searches for the first editable position at or beyond the specified position, . Operating under the assumption that there are enough editable positions after this point, the existing character values are replaced one-by-one with the contents of the replacement string parameter, .

  The following conditions are considered errors. When an error occurs, no replacement occurs and returns false.

  The parameter is less than zero or greater than the of the formatted string.

  There are not enough editable positions in the formatted string to hold the contents of the replacement string.

  One of the replacement character values is not valid because it is not printable or does not match its corresponding mask element.

  Replaces a range of editable characters starting at the specified position with the specified string.

  true if all the characters were successfully replaced; otherwise, false.

  The value used to replace the existing editable characters. The zero-based position to search for the first editable character to replace.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  can treat two categories of characters, paces and prompt characters, in a special manner. Normally, each input character will be tested against the mask and either accepted or rejected. Operating on the assumption that the property is set to a value other than null, then setting the property to true will result in special processing for the prompt character. When a prompt character is added, it causes the current mask character position to be cleared and the current position to be advanced to the next editable character.

  takes precedence over the property as described in the following table.

  Resulting behavior

  true

  true

  The prompt character can be added and it causes the current mask position to be reset. The default.

  true

  false

  The prompt character can be added and it causes the current mask position to be reset.

  false

  true

  The prompt character is processed as a normal input character.

  false

  false

  The prompt character is not valid and methods attempting to add the character will fail.

  Gets or sets a value that determines how an input character that matches the prompt character should be handled.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  can treat two categories of characters, spaces and prompt characters, in a special manner. Normally, each input character will be tested against the mask and either accepted or rejected. Setting the property to true will result in the current mask character position being cleared and the current position being advanced to the next editable character.

  is useful when assigning text that was saved excluding the prompt, where the prompt is replaced with a space. Before restoring such a string, setting to true will reset the prompt characters at the positions occupied by spaces in the input string.

  Gets or sets a value that determines how a space input character should be handled.

- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  The method clears the existing contents of the formatted string and then applies the mask against the string to update the contents of the formatted string.

  The following conditions are considered errors. When an error occurs, the formatted string remains unaltered and returns false.

  There are not enough editable positions in the formatted string to hold the contents of the replacement string.

  One of the replacement character values is not valid because it is not printable or does not match its corresponding mask element.

  Sets the formatted string to the specified input string.

  true if all the characters were successfully set; otherwise, false.

  The value used to set the formatted string.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` To be added. To be added. To be added. To be added. To be added. To be added.
- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  Input masks can contain literal and editable characters. If an attempt is made to add an input character to the position in a mask occupied by a literal, the value of the property determines the result.

  If this property is true, it is valid to overwrite a literal with the same value when adding input characters. For example, a forward slash character value, '/', could be added to the third position of the mask "00/00/000".

  If this property is false, it is not valid to assign any value to a mask position occupied by a literal character.

  Gets or sets a value indicating whether literal character positions in the mask can be overwritten by their same values.

- Method
  2.0.0.0
  4.0.0.0
  System.String

  The method will always include prompt and literal characters in the return value, regardless of the value of the or properties. This method will always display password characters if the property is set to a character value other than null.

  is commonly used to obtain the string to display in associated user interface elements, such as .

  Returns the formatted string in a displayable form.

  The formatted that includes prompts and mask literals.

- Method
  2.0.0.0
  4.0.0.0
  System.String

  This version of the overloaded method includes prompts and literals according to the current values of the and properties, respectively. It will always return the original input characters, ignoring the value of the property.

  Because this method reveals information that is usually protected in the user interface by password characters, it should be used with extreme caution to avoid accidentally revealing sensitive user data.

  Returns the formatted string that includes all the assigned character values.

  The formatted that includes all the assigned character values.

- Method
  2.0.0.0
  4.0.0.0
  System.String ``

  This version of the overloaded method includes prompts and literals according to the current values of the and properties, respectively. If the parameter is true, it will return the original input characters, ignoring the value of the property. If this parameter is false, it will use the password character to obscure editable user input if the property is set to a value other than null.

  Because this method potentially reveals information that is usually protected in the user interface by password characters, it should be used with extreme caution to avoid accidentally revealing sensitive user data.

  Returns the formatted string, optionally including password characters.

  The formatted that includes literals, prompts, and optionally password characters.

  true to return the actual editable characters; otherwise, false to indicate that the property is to be honored.
- Method
  2.0.0.0
  4.0.0.0
  System.String `` ``

  This version of the overloaded method includes prompts and literals according to the values of the and parameters, respectively. Notice that these parameters override the values of the properties. This method will always return the original input characters, ignoring the value of the property.

  Because this method reveals information that is usually protected in the user interface by password characters, it should be used with extreme caution to avoid accidentally revealing sensitive user data.

  Returns the formatted string, optionally including prompt and literal characters.

  The formatted that includes all the assigned character values and optionally includes literals and prompts.

  true to include prompt characters in the return string; otherwise, false. true to include literal characters in the return string; otherwise, false.
- Method
  2.0.0.0
  4.0.0.0
  System.String `` ``

  This version of the overloaded method returns a substring of the formatted string, starting at the position and including the subsequent number of characters specified by the parameter. The returned string includes prompts and literals according to the current values of the and properties, respectively. The return string will contain the original input characters; the property is always ignored.

  Because this method reveals information that is usually protected in the user interface by password characters, it should be used with extreme caution to avoid accidentally revealing sensitive user data.

  performs the following actions when there are discrepancies in the input parameters:

  If is less than zero, the starting position is set to zero.

  If is greater than or equal to the actual of the formatted string, the string is returned.

  If is greater than the remaining number of characters past the starting position, only the remaining characters are returned.

  If is less than or equal to zero, the string is returned.

  Returns a substring of the formatted string.

  If successful, a substring of the formatted , which includes all the assigned character values; otherwise the string.

  The zero-based position in the formatted string where the output begins. The number of characters to return.
- Method
  2.0.0.0
  4.0.0.0
  System.String `` `` ``

  This version of the overloaded method returns a substring of the formatted string, starting at the position and including the subsequent number of characters specified by the parameter. The returned string includes prompts and literals according to the current values of the and properties, respectively. If the parameter is true, it will return the original input characters, ignoring the value of the property. If this parameter is false, it will use the password character to obscure editable user input if the property is set to a value other than null.

  Because this method potentially reveals information that is usually protected in the user interface by password characters, it should be used with extreme caution to avoid accidentally revealing sensitive user data.

  performs the following actions when there are discrepancies in the input parameters:

  If is less than zero, the starting position is set to zero.

  If is greater than or equal to the actual of the formatted string, the string is returned.

  If is greater than the remaining number of characters past the starting position, only the remaining characters are returned.

  If is less than or equal to zero, the string is returned.

  Returns a substring of the formatted string, optionally including password characters.

  If successful, a substring of the formatted , which includes literals, prompts, and optionally password characters; otherwise the string.

  true to return the actual editable characters; otherwise, false to indicate that the property is to be honored. The zero-based position in the formatted string where the output begins. The number of characters to return.
- Method
  2.0.0.0
  4.0.0.0
  System.String `` `` `` ``

  This version of the overloaded method returns a substring of the formatted string, starting at the position and including the subsequent number of characters specified by the parameter. The return string includes prompts and literals according to the values of the and parameters, respectively. Notice that these parameters override the values of the properties. This method will always return the original input characters, ignoring the value of the property.

  Because this method reveals information that is usually protected in the user interface by password characters, it should be used with extreme caution to avoid accidentally revealing sensitive user data.

  performs the following actions when there are discrepancies in the input parameters:

  If is less than zero, the starting position is set to zero.

  If is greater than or equal to the actual of the formatted string, the string is returned.

  If is greater than the remaining number of characters past the starting position, only the remaining characters are returned.

  If is less than or equal to zero, the string is returned.

  Returns a substring of the formatted string, optionally including prompt and literal characters.

  If successful, a substring of the formatted , which includes all the assigned character values and optionally includes literals and prompts; otherwise the string.

  true to include prompt characters in the return string; otherwise, false. true to include literal characters in the return string; otherwise, false. The zero-based position in the formatted string where the output begins. The number of characters to return.
- Method
  2.0.0.0
  4.0.0.0
  System.String `` `` `` `` ``

  This version of the overloaded method returns a substring of the formatted string, starting at the position and including the subsequent number of characters specified by the parameter. The return string includes prompts and literals according to the values of the and parameters, respectively. Notice that these parameters override the values of the and properties. If the parameter is true, it will return the original input characters, ignoring the value of the property. If this parameter is false, it will use the password character to obscure editable user input if the property is set to a value other than null.

  Because this method potentially reveals information that is usually protected in the user interface by password characters, it should be used with extreme caution to avoid accidentally revealing sensitive user data.

  performs the following actions when there are discrepancies in the input parameters:

  If is less than zero, the starting position is set to zero.

  If is greater than or equal to the actual of the formatted string, the string is returned.

  If is greater than the remaining number of characters past the starting position, only the remaining characters are returned.

  If is less than or equal to zero, the string is returned.

  Returns a substring of the formatted string, optionally including prompt, literal, and password characters.

  If successful, a substring of the formatted , which includes all the assigned character values and optionally includes literals, prompts, and password characters; otherwise the string.

  true to return the actual editable characters; otherwise, false to indicate that the property is to be honored. true to include prompt characters in the return string; otherwise, false. true to return literal characters in the return string; otherwise, false. The zero-based position in the formatted string where the output begins. The number of characters to return.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  A character is said to be escaped if it is valid input, but is not assigned to that position in the formatted string. Escaped characters fall into the following three categories:

  Prompt characters are escaped if the property is true.

  Input characters are escaped if they have the same value as the literal in the mask, and if the property is true.

  Space characters are escaped if the property is true.

  The method will also return false if the parameter is less than zero or greater than the of the .

  Tests whether the specified character would be escaped at the specified position.

  true if the specified character would be escaped at the specified position; otherwise, false.

  The value to test. The position in the mask to test the input character against.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  The applies the string against the mask, without actually changing the formatted string, to test whether would be valid in a corresponding operation. This method also returns true if input is null or has zero length.

  Tests whether the specified string could be set successfully.

  true if the specified string represents valid input; otherwise, false.

  The value to test.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` To be added. To be added. To be added. To be added. To be added. To be added.