Source.GetLineIndexOfPosition(Int32, Int32, Int32) 方法

定义

获取指定位置的行和列。

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)

参数

position
Int32

源文件中的位置或字符偏移量。

line
Int32

弄返回与位置对应的行号。

col
Int32

弄返回与位置相对应) 行 (偏移量的列号。

注解

此方法将对 GetLineIndexOfPosition IVsTextLines 传递给类构造函数的对象的方法的调用转发给 Source 。 如果发生错误,则会引发异常。

适用于