MaskedTextProvider.Remove Method

Definition

Removes the last assigned character from the formatted string.

Overloads

Remove()

Removes the last assigned character from the formatted string.

Remove(Int32, MaskedTextResultHint)

Removes the last assigned character from the formatted string, and then outputs the removal position and descriptive information.

Remove()

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

Removes the last assigned character from the formatted string.

C#
public bool Remove();

Returns

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

Remarks

The Remove method has no effect if there are no characters assigned to the mask yet.

When the last assigned character is removed from the formatted string, the editable mask character is reset for that position, allowing subsequent input.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Remove(Int32, MaskedTextResultHint)

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

Removes the last assigned character from the formatted string, and then outputs the removal position and descriptive information.

C#
public bool Remove(out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint);

Parameters

testPosition
Int32

The zero-based position in the formatted string where the character was actually removed. 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 Remove method has no effect if there are no characters assigned to the mask yet.

When the last assigned character is removed from the formatted string, the editable mask character is reset for that position, allowing subsequent input.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1