Source.GetPositionOfLineIndex Method

Gets the position corresponding to the given line and character offset location.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Syntax

'宣言
Public Function GetPositionOfLineIndex ( _
    line As Integer, _
    col As Integer _
) As Integer
'使用
Dim instance As Source
Dim line As Integer
Dim col As Integer
Dim returnValue As Integer

returnValue = instance.GetPositionOfLineIndex(line, _
    col)
public int GetPositionOfLineIndex(
    int line,
    int col
)
public:
int GetPositionOfLineIndex(
    int line, 
    int col
)
public function GetPositionOfLineIndex(
    line : int, 
    col : int
) : int

Parameters

  • col
    Type: System.Int32

    The offset on the line of the location.

Return Value

Type: System.Int32

The position or character offset from the start of the source file.

Remarks

This method forwards the call to the GetPositionOfLineIndex method on the IVsTextLines object passed to the Source class constructor. An exception is thrown if an error occurs.

Permissions

See Also

Reference

Source Class

Source Members

Microsoft.VisualStudio.Package Namespace