Share via


IVsTextLayer.GetLastLineIndex(Int32, Int32) Method

Definition

Returns the length and index of the last line.

public:
 int GetLastLineIndex([Runtime::InteropServices::Out] int % piLine, [Runtime::InteropServices::Out] int % piIndex);
int GetLastLineIndex([Runtime::InteropServices::Out] int & piLine, [Runtime::InteropServices::Out] int & piIndex);
public int GetLastLineIndex (out int piLine, out int piIndex);
abstract member GetLastLineIndex : int * int -> int
Public Function GetLastLineIndex (ByRef piLine As Integer, ByRef piIndex As Integer) As Integer

Parameters

piLine
Int32

[out] The length of the last line.

piIndex
Int32

[out] The index of the last line.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

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

GetLastLineIndex is a shortcut for the frequent pattern of calling GetLineCount & then GetLengthOfLine on the line

Applies to