This topic has not yet been rated - Rate this topic

IVsTaskItem2.Column Method

Returns the column number of a task within the specified file.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

int Column (
	out int piCol
)
int Column (
	/** @attribute OutAttribute() */ /** @ref */ int piCol
)
JScript does not support passing value-type arguments by reference.

Parameters

piCol

[out, retval] Number of the column that contains the task item within the file.

Return Value

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

COM Signature

From vsshell.idl:

HRESULT IVsTaskItem::Column(
   [out, retval] long *piCol
);

The column is not visible to the user, but is used for sorting tasks. Implement this method if there is a file, line, and column associated with your task item, and if you want to sort errors within a single line, based on the column specified. Each character on a line is equivalent to one column. Thus, to specify a task related to a coding error starting 10 characters into a line, you would specify a column number of 10.

To specify the file associated with the task item, implement the Document method; to specify the line that the column refers to, implement the Line method. 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.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.