MaskedTextProvider.RemoveAt Method (Int32)

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

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)

public bool RemoveAt(
	int position


Type: System.Int32

The zero-based position of the assigned character to remove.

Return Value

Type: System.Boolean
true if the character was successfully removed; otherwise, false.

The RemoveAt 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 RemoveAt returns false.

This method call is exactly equivalent to the following call to the overloaded RemoveAt(Int32, Int32) version:

RemoveAt(pos, pos);

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft