Partager via


IVsTextLines.GetLengthOfLine Method (Int32, Int32%)

Returns the length of a line in the buffer.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Déclaration
Function GetLengthOfLine ( _
    iLine As Integer, _
    <OutAttribute> ByRef piLength As Integer _
) As Integer
'Utilisation
Dim instance As IVsTextLines
Dim iLine As Integer
Dim piLength As Integer
Dim returnValue As Integer

returnValue = instance.GetLengthOfLine(iLine, _
    piLength)
int GetLengthOfLine(
    int iLine,
    out int piLength
)
int GetLengthOfLine(
    [InAttribute] int iLine, 
    [OutAttribute] int% piLength
)
abstract GetLengthOfLine : 
        iLine:int * 
        piLength:int byref -> int 
function GetLengthOfLine(
    iLine : int, 
    piLength : int
) : int

Parameters

  • iLine
    Type: System.Int32
    [in] Number of the line whose length is requested.
  • piLength
    Type: System.Int32%
    [out] Pointer to the length of the line.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

IVsTextBuffer.GetLengthOfLine(Int32, Int32%)

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextLines::GetLengthOfLine(
   [in] long iLine,
   [out] long *piLength
);

This method is used heavily by views and is reasonably efficient in all implementations.

.NET Framework Security

See Also

Reference

IVsTextLines Interface

IVsTextLines Members

GetLengthOfLine Overload

Microsoft.VisualStudio.TextManager.Interop Namespace