MaskedTextProvider::RemoveAt Method (Int32, Int32)

 

Removes the assigned characters between the specified positions from the formatted string.

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

public:
bool RemoveAt(
	int startPosition,
	int endPosition
)

Parameters

startPosition
Type: System::Int32

The zero-based index of the first assigned character to remove.

endPosition
Type: System::Int32

The zero-based index of the last 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 positions specified.

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.

.NET Framework
Available since 2.0
Return to top
Show: