संपादित करें

इसके माध्यम से साझा किया गया


MaskedTextProvider.RemoveAt Method

Definition

Removes one or more assigned characters from the formatted string.

Overloads

RemoveAt(Int32)

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

RemoveAt(Int32, Int32)

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

RemoveAt(Int32, Int32, Int32, MaskedTextResultHint)

Removes the assigned characters between the specified positions from the formatted string, and then outputs the removal position and descriptive information.

RemoveAt(Int32)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

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

public:
 bool RemoveAt(int position);
public bool RemoveAt (int position);
member this.RemoveAt : int -> bool
Public Function RemoveAt (position As Integer) As Boolean

Parameters

position
Int32

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

Returns

true if the character was successfully removed; otherwise, false.

Remarks

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);

See also

Applies to

RemoveAt(Int32, Int32)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

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

public:
 bool RemoveAt(int startPosition, int endPosition);
public bool RemoveAt (int startPosition, int endPosition);
member this.RemoveAt : int * int -> bool
Public Function RemoveAt (startPosition As Integer, endPosition As Integer) As Boolean

Parameters

startPosition
Int32

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

endPosition
Int32

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

Returns

true if the character was successfully removed; otherwise, false.

Remarks

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.

See also

Applies to

RemoveAt(Int32, Int32, Int32, MaskedTextResultHint)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Removes the assigned characters between the specified positions from the formatted string, and then outputs the removal position and descriptive information.

public:
 bool RemoveAt(int startPosition, int endPosition, [Runtime::InteropServices::Out] int % testPosition, [Runtime::InteropServices::Out] System::ComponentModel::MaskedTextResultHint % resultHint);
public bool RemoveAt (int startPosition, int endPosition, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint);
member this.RemoveAt : int * int * int * MaskedTextResultHint -> bool
Public Function RemoveAt (startPosition As Integer, endPosition As Integer, ByRef testPosition As Integer, ByRef resultHint As MaskedTextResultHint) As Boolean

Parameters

startPosition
Int32

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

endPosition
Int32

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

testPosition
Int32

If successful, the zero-based position in the formatted string of where the characters were actually removed; otherwise, the first position where the operation failed. An output parameter.

resultHint
MaskedTextResultHint

A MaskedTextResultHint that succinctly describes the result of the operation. An output parameter.

Returns

true if the character was successfully removed; otherwise, false.

Remarks

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.

This version of RemoveAt provides two additional output parameters to convey more information about the operation of the method.

See also

Applies to