IVsTaskItem2::Line Method (Int32)

 

Returns the line number of a task item within a specified document.

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

int Line(
	[OutAttribute] int% piLine
)

Parameters

piLine
Type: System::Int32

[out, retval] Line number of the task item.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

From vsshell.idl:

HRESULT IVsTaskItem::Line(
   [out,retval] long *piLine
);

Implement this method to specify a line that contains a task item. To specify the file corresponding to the task and the exact column within the file, implement the Document and Column methods, respectively. Implement the NavigateTo method to open the file specified by the Document method and move the cursor to the position specified by the Line and Column methods.

System_CAPS_noteNote

The line number, piLine, is zero -based internally. The line number in the display is one -based.

Return to top
Show: