Version

LineIndexFromOffset Method

Returns the corresponding zero-based line index from a zero-based offset value.
Syntax
'Declaration
 
Public Function LineIndexFromOffset( _
   ByVal offset As Integer _
) As Integer
public int LineIndexFromOffset( 
   int offset
)

Parameters

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

Return Value

The corresponding zero based line index.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeExceptionIf offset is less than zero or greater than the document's overall length.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, 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