Поделиться через


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

'Declaration
Function Line ( _
    <OutAttribute> ByRef piLine As Integer _
) As Integer
int Line(
    out int piLine
)
int Line(
    [OutAttribute] int% piLine
)
abstract Line : 
        piLine:int byref -> int 
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.

.NET Framework Security

See Also

Reference

IVsTaskItem Interface

Microsoft.VisualStudio.Shell.Interop Namespace