Compartilhar via


IVsTaskItem.Column(Int32) Method

Definition

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

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

Parameters

piCol
Int32

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

Returns

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

Remarks

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; 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.

Applies to