MaskedTextBox::SelectedText Property
.NET Framework (current version)
Gets or sets the current selection in the MaskedTextBox control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Selections retrieved using this property are formatted according to the control's formatting properties, such as Mask, FormatProvider, TextMaskFormat and CutCopyMaskFormat. Selections set using this property behave like a Paste operation: each character is matched against the mask, and the MaskInputRejected event is raised for invalid characters. If CutCopyMaskFormat is true, literals and prompt characters are allowed when setting SelectedText, and will be removed silently unless they violate the mask.
.NET Framework
Available since 2.0
Available since 2.0
Show: