System.ComponentModel.MaskedTextProvider.FindNonEditPositionFrom Method

Returns the position of the first non-editable position after the specified position using the specified search direction.

Syntax

public int FindNonEditPositionFrom (int position, bool direction)

Parameters

position
The zero-based position in the formatted string to start the search.
direction
A bool indicating the search direction; either true to search forward or false to search backward.

Returns

If successful, an int representing the zero-based position of the first literal position encountered; otherwise MaskedTextProvider.InvalidIndex.

Remarks

The MaskedTextProvider.FindNonEditPositionFrom(int, bool) method is used to search for the next literal character in the formatted string after the specified position. The result can subsequently be passed as a parameter to the MaskedTextProvider.Item(int) indexer to obtain the literal value at this position.

The MaskedTextProvider.FindEditPositionFrom(int, bool) method is the complement of this method.

Requirements

Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0