Compartir a través de


IVsTaskItem.Line Method

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)

Syntax

'Declaración
Function Line ( _
    <OutAttribute> ByRef piLine As Integer _
) As Integer
'Uso
Dim instance As IVsTaskItem
Dim piLine As Integer
Dim returnValue As Integer

returnValue = instance.Line(piLine)
int Line(
    out int piLine
)
int Line(
    [OutAttribute] int% piLine
)
function Line(
    piLine : int
) : int

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.

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.

Permissions

See Also

Reference

IVsTaskItem Interface

IVsTaskItem Members

Microsoft.VisualStudio.Shell.Interop Namespace