Version

LocationFromOffset Method

Returns the corresponding line and character location from a zero-based offset value.
Syntax
'Declaration
 
Public Function LocationFromOffset( _
   ByVal offset As Integer _
) As TextLocation
public TextLocation LocationFromOffset( 
   int offset
)

Parameters

offset
The zero-based offset relative to the beginning of the document for this snapshot.

Return Value

The corresponding TextLocation struct.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeExceptionIf offset is less than zero or greater than the document's overall length - 1.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also