MaskedTextProvider.Replace Method (Char, Int32)
Assembly: System (in system.dll)
The Char value that replaces the existing value.
The zero-based position to search for the first editable character to replace.
Return Valuetrue if the character was successfully replaced; otherwise, false.
The Replace(Char,Int32) method searches for the first editable position in the formatted string at or beyond the specified position, pos. If one is found, the value of the editable position is changed to the specified character, input. 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 pos parameter is less than zero or greater than the Length of the formatted string.
An editable character was not found in the formatted string at or beyond the specified position, pos.
The replacement character, input, is not a valid input character because it is not printable or does not match its corresponding mask element.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.