
Never Forget a TODO Again #21
Chapter 3, Navigating Visual Studio
|
91
HACK
HACK
#21
Never Forget a TODO Again Hack #21
Place reminders for yourself or for other developers that are nearly
impossible to miss.
The task list (Ctrl-Alt-K/View.TaskList) is a handy tool that is most often
used to view errors or warnings from the compilation of your code. In Visual
Studio .NET 2003, when you compile your project, any errors or warnings
are displayed in the task list. You can read the message and double-click on
the item to jump to the offending line in your code. (Visual Studio 2005
includes a separate error list.)
The task list also has another use; it can be used to leave reminders for your-
self or other members of your team in comment form.
Comments
By default, the task list includes three different comments; these are //TODO,
//UNDONE, and //HACK.
Visual Studio 2005 includes only the //TODO comment by
default; the other comments can still be added through the
process outlined later in this hack.
You can use these comments anywhere throughout your code, and they will
show up in the task list when the file with the comment is open. Visual Stu-
dio .NET 2003 uses this functionality by default when you create a new
class; it adds the following code to the constructor of every new class:
//
// TODO: Add constructor logic here
//
First make sure that the task list is configured to show comments, and then
you will