MaskedTextProvider.IsAvailablePosition(Int32) Method

Definition

Determines whether the specified position is available for assignment.

C#
public bool IsAvailablePosition(int position);

Parameters

position
Int32

The zero-based position in the mask to test.

Returns

true if the specified position in the formatted string is editable and has not been assigned to yet; otherwise false.

Remarks

The IsAvailablePosition method returns true only if all of the following conditions are true:

  • The pos parameter is within the bounds of the formatted string; that is, its value is greater than or equal to zero and less than the Length of the formatted string.

  • The specified position is an editable character.

  • A character has not already been assigned to this position.

Applies to

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

See also