Export (0) Print
Expand All
ID
Top
Expand Minimize

Line Property

Visual Studio .NET 2003

Sets or returns the line number in the source code associated with the task item.

[Visual Basic .NET]
Public Property Line() As Integer
[Visual Basic 6]
Property Get Line() As Long
Property Let Line( _
   ByVal NewValue As Long _
) 
[C++]
HRESULT __stdcall get_Line(
   /* [out, retval] */ long* retVal
);
HRESULT __stdcall put_Line(
   /* [in] */ long NewValue
);
[C#]
public int Line {get; set;}
[JScript .NET]
public function get Line() : int
public function set Line(
   NewValue : int
)

Parameters

NewValue
A long integer indicating the line in the source code associated with the new task item. The default value is 0.

Example

Sub LineExample()
   ' Before running, add a task to the Task List.
   Dim win As Window = DTE.Windows.Item(Constants.vsWindowKindTaskList)
   Dim TL As TaskList = win.Object
   Dim TLItem As TaskItem = TL.TaskItems.Item(1)
   Dim msg As String

   'List properties of the Task Item.
   msg = "TaskItem Category property value: " & TLItem.Category & vbCr
   msg = msg & "TaskItem SubCategory property value: " & TLItem.SubCategory & vbCr
   ' The following line produces an error unless you have line numbering 
   ' turned on.
   msg = msg & "TaskItem Line property value: " & TLItem.Line & vbCr
   msg = msg & "TaskItem Checked property value: " & TLItem.Checked & vbCr
   msg = msg & "TaskItem Displayed property value: " & TLItem.Displayed &  vbCr
   msg = msg & "TaskItem IsSettable property value: " & TLItem.IsSettable(vsTaskListColumn.vsTaskListColumnCheck) & vbCr
   msg = msg & "TaskItem Priority property value: " & TLItem.Priority & vbCr
   MsgBox(msg)
End Sub

See Also

Applies To: TaskList Object

Show:
© 2014 Microsoft