共用方式為


IVsTextBuffer.GetLastLineIndex 方法

傳回文字緩衝區中的最後一行。

命名空間:  Microsoft.VisualStudio.TextManager.Interop
組件:  Microsoft.VisualStudio.TextManager.Interop (在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

語法

'宣告
Function GetLastLineIndex ( _
    <OutAttribute> ByRef piLine As Integer, _
    <OutAttribute> ByRef piIndex As Integer _
) As Integer
int GetLastLineIndex(
    out int piLine,
    out int piIndex
)
int GetLastLineIndex(
    [OutAttribute] int% piLine, 
    [OutAttribute] int% piIndex
)
abstract GetLastLineIndex : 
        piLine:int byref * 
        piIndex:int byref -> int
function GetLastLineIndex(
    piLine : int, 
    piIndex : int
) : int

參數

  • piLine
    類型:Int32%

    [] out最後一行文字緩衝區的指標。

  • piIndex
    類型:Int32%

    [] out這個引數的指標piLine

傳回值

類型:Int32
如果此方法將會成功,則會傳回S_OK。如果失敗,它就會傳回錯誤碼。

備註

COM 簽章

從 textmgr.idl:

HRESULT IVsTextBuffer::GetLastLineIndex(
   [out] long *piLine,
   [out] long *piIndex
);

這個方法可能會需要相當多的資源,基礎緩衝區的實作而定。 也就是可能非常困難計算緩衝區的大小,如果它是虛擬行導向實作 Visual Basic 所示。

.NET Framework 安全性

請參閱

參考

IVsTextBuffer 介面

Microsoft.VisualStudio.TextManager.Interop 命名空間