Source.GetLineIndexOfPosition(Int32, Int32, Int32) Method

Definition

Gets the line and column for the specified position.

public:
 void GetLineIndexOfPosition(int position, [Runtime::InteropServices::Out] int % line, [Runtime::InteropServices::Out] int % col);
void GetLineIndexOfPosition(int position, [Runtime::InteropServices::Out] int & line, [Runtime::InteropServices::Out] int & col);
public void GetLineIndexOfPosition (int position, out int line, out int col);
member this.GetLineIndexOfPosition : int * int * int -> unit
Public Sub GetLineIndexOfPosition (position As Integer, ByRef line As Integer, ByRef col As Integer)

Parameters

position
Int32

The position or character offset into the source file.

line
Int32

[out] Returns the line number corresponding to the position.

col
Int32

[out] Returns the column number (offset on the line) corresponding to the position.

Remarks

This method forwards the call to the GetLineIndexOfPosition method on the IVsTextLines object passed to the Source class constructor. An exception is thrown if an error occurs.

Applies to