VsTextViewClass.GetCaretPos 方法

返回光标位置的行和列索引。

命名空间:  Microsoft.VisualStudio.TextManager.Interop
程序集:  Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

语法

声明
Public Overridable Function GetCaretPos ( _
    <OutAttribute> ByRef piLine As Integer, _
    <OutAttribute> ByRef piColumn As Integer _
) As Integer
public virtual int GetCaretPos(
    out int piLine,
    out int piColumn
)
public:
virtual int GetCaretPos(
    [OutAttribute] int% piLine, 
    [OutAttribute] int% piColumn
)
abstract GetCaretPos : 
        piLine:int byref * 
        piColumn:int byref -> int  
override GetCaretPos : 
        piLine:int byref * 
        piColumn:int byref -> int
public function GetCaretPos(
    piLine : int, 
    piColumn : int
) : int

参数

  • piLine
    类型:Int32%

    [out] 对包含行的整数的指针,因此,如果方法成功。

  • piColumn
    类型:Int32%

    [out] 设置为包含列的整数的指针,因此,如果方法成功。 Viewcol 坐标可以包括虚拟空间。

返回值

类型:Int32

实现

IVsTextView.GetCaretPos(Int32%, Int32%)

.NET Framework 安全性

请参阅

参考

VsTextViewClass 类

Microsoft.VisualStudio.TextManager.Interop 命名空间