Source::GetLineIndexOfPosition Method (Int32, Int32, Int32)

 

Gets the line and column for the specified position.

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

public:
void GetLineIndexOfPosition(
	int position,
	[OutAttribute] int% line,
	[OutAttribute] int% col
)

Parameters

position
Type: System::Int32

The position or character offset into the source file.

line
Type: System::Int32

[out] Returns the line number corresponding to the position.

col
Type: System::Int32

[out] Returns the column number (offset on the line) corresponding to the position.

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

Return to top
Show: