System.ComponentModel.MaskedTextProvider.ToDisplayString Method

Returns the formatted string in a displayable form.

Syntax

public string ToDisplayString ()

Returns

The formatted string that includes prompts and mask literals.

Remarks

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

MaskedTextProvider.ToDisplayString is commonly used to obtain the string to display in associated user interface elements, such as System.Windows.Forms.MaskedTextBox.

Requirements

Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0