This documentation is archived and is not being maintained.

MaskedTextProvider.FindNonEditPositionFrom Method

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

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

public int FindNonEditPositionFrom (
	int position,
	bool direction
public int FindNonEditPositionFrom (
	int position, 
	boolean direction
public function FindNonEditPositionFrom (
	position : int, 
	direction : boolean
) : int
Not applicable.



The zero-based position in the formatted string to start the search.


A Boolean indicating the search direction; either true to search forward or false to search backward.

Return Value

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

The FindNonEditPositionFrom 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 Item indexer to obtain the literal value at this position.

The FindEditPositionFrom method is the complement of this method.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0