
You have many tasks to remember, and you want to track them in Visual Studio with TODO comments. These comments can help get you more organized about your projects. You want to get the interface set up and gain a way to list your to-do items in a central place. Here we look at ways you can use TODO comments in your C# programs.
TODO comments allow you to tell Visual Studio to maintain a central list of tasks, which it reads from many different places in your code. The Task List is a panel or floating window in Visual Studio that will display all the TODO comments in your project. To open the list, go to View menu -> Task List.
You probably have a lot of code that needs a lot of work. If you don't, then you need to write code that needs a lot of work. Here are some examples of TODO lines that Visual Studio 2008 will notice and put into its special Task Pane.
//todo: fix dialog windows //TODO: work on SQLCE guide // Todo new screenshot
Description of example. This will appear in your tasks pane as a separate task. Note that you have some flexibility with these tokens. The strings "todo", "TODO", and "TODO" all work equally well—Visual Studio's parser gives you a little bit of freedom.
Here we make a more general point about comments in the C# programming language. Comments are used only at the source level of your program, not the compiled version of the program. The TODO comments noted here are parsed by Visual Studio in the IDE. You can find more about how comments relate to C# programs here.
Here we looked at TODO comment syntax in the Visual Studio integrated development environment. You can go through your project and put TODO comments everywhere you need to do something. Also, there are a couple other predefined comment tokens you can use, called UNDONE and HACK. Experiment and find what suits your style the best, so you can be as productive as possible—or as productive as you want to be.