Share via


IVsTaskItem2.Line(Int32) Method

Definition

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

public:
 int Line([Runtime::InteropServices::Out] int % piLine);
int Line([Runtime::InteropServices::Out] int & piLine);
public int Line (out int piLine);
abstract member Line : int -> int
Public Function Line (ByRef piLine As Integer) As Integer

Parameters

piLine
Int32

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

Returns

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

Implements

Remarks

COM Signature

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.

Note

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

Applies to