MaskedTextProvider.IsAvailablePosition Method (Int32)


Determines whether the specified position is available for assignment.

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

public bool IsAvailablePosition(
	int position


Type: System.Int32

The zero-based position in the mask to test.

Return Value

Type: System.Boolean

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

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.

.NET Framework
Available since 2.0
Return to top