Visual Studio tip: Task List Shortcuts without adding comments to code
Posted: (EET/GMT+2)
Visual Studio's code editor contains a nice features that allow you to add entries to the Task List window. You might already be familiar with ToDo comments, which are written like this:
// TODO: remember to check null values
When you add comments like this to your C# code, all those comments are listed in the Task List window, thus giving you a quick way of keeping notes of things to do. Visual Studio supports the built-in tokens TODO, HACK, UNDONE and NOTE.
But, a less-known feature is called Task List Shortcuts. These work similar to bookmarks, but are instead pointers to the Task List. In the code editor, you can mark any line as a task list shortcut, and then this line will be shown in the task list. You don't need to add code comments.
To add a task list shortcut, position the cursor to the line which you'd like to mark, and then select the menu command Edit/Bookmarks/Add Task List Shortcut. A small black arrow will be added the left-side margin of the code editor, and the line is shown in Task List.
Happy hacking!