Source::GetPositionOfLineIndex Method (Int32, Int32)

 

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

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

public:
int GetPositionOfLineIndex(
	int line,
	int col
)

Parameters

line
Type: System::Int32

The line number of the location.

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.

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.

Return to top
Show: