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
)

Parameters

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
Available since 2.0
Return to top
Show: