VsTextViewClass.GetNearestPosition Method

Converts a line and column index to a text stream position.

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

Syntax

'Declaration
Public Overridable Function GetNearestPosition ( _
    iLine As Integer, _
    iCol As Integer, _
    <OutAttribute> ByRef piPos As Integer, _
    <OutAttribute> ByRef piVirtualSpaces As Integer _
) As Integer
public virtual int GetNearestPosition(
    int iLine,
    int iCol,
    out int piPos,
    out int piVirtualSpaces
)
public:
virtual int GetNearestPosition(
    [InAttribute] int iLine, 
    [InAttribute] int iCol, 
    [OutAttribute] int% piPos, 
    [OutAttribute] int% piVirtualSpaces
)
abstract GetNearestPosition : 
        iLine:int * 
        iCol:int * 
        piPos:int byref * 
        piVirtualSpaces:int byref -> int 
override GetNearestPosition : 
        iLine:int * 
        iCol:int * 
        piPos:int byref * 
        piVirtualSpaces:int byref -> int 
public function GetNearestPosition(
    iLine : int, 
    iCol : int, 
    piPos : int, 
    piVirtualSpaces : int
) : int

Parameters

  • iLine
    Type: System.Int32
    [in] Integer containing the line index.
  • iCol
    Type: System.Int32
    [in] Integer containing the column index. Viewcol coordinates might include virtual space.
  • piPos
    Type: System.Int32%
    [out] Pointer to an integer containing the position in the text stream.
  • piVirtualSpaces
    Type: System.Int32%
    [out] Pointer to an integer containing the number of virtual spaces.

Return Value

Type: System.Int32

Implements

IVsTextView.GetNearestPosition(Int32, Int32, Int32%, Int32%)

.NET Framework Security

See Also

Reference

VsTextViewClass Class

Microsoft.VisualStudio.TextManager.Interop Namespace