Keep Track of your Tasks With the Task List
Posted
Sat, Sep 4 2010 17:27
by
Deborah Kurata
Software development is more than just programming. We need to figure out what we are going to code, how we are going to code it, share information with our team, and track our progress. One tool that can help us with these tasks is the Task List within Visual Studio.
The Task List is available using View | Task List as shown below.
Double-click on any task to jump to the code at the defined line.
The way to add an item onto the Task List is to add a ToDo comment anywhere in your code:
In C#:
// ToDo: Finish this.
if (string.IsNullOrWhiteSpace(customerIdTextBox.Text))
customerIdTextBox.Text = "0";
In VB:
' ToDo: Finish this.
If String.IsNullOrWhiteSpace(customerIdTextBox.Text) Then
customerIdTextBox.Text = "0"
End If
Any comment that begins with ToDo, Hack, or UnDone will appear in the Task List. Use these comments to track your programming tasks, leave yourself notes on your progress, and add notes for other developers.
You can also add your own tokens to appear in the Task List. Use Tools | Options | Environment | Task List:
Enter the desired token name in the Name field and click the Add button. The name is added to the list. In the above example, DEMO, John, and Mary are custom tokens.
If you use a source control product such as SVN or TFS, you can add comments to John or Mary and they will see them the next time they get code changes.
I use the DEMO token to keep track of the places in my code that I want to demonstrate when I give talks:
Use tasks any time you want to define a location in your code that you can easily jump to at a later time. Use them to leave notes for other developers on your team. Or use them to keep track of what you were doing Friday afternoon so you remember where you were come Monday morning.
Enjoy!