How to : Use Visual Studio TODO Comments

There are many type of comments available in Visual Studio, but have you ever seen the TODO comment?

abstract:

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.

Using TODO

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.


Some example TODO comments

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.

<i>//todo: fix dialog windows
//TODO: work on SQLCE guide
// Todo new screenshot</i>

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.

More comments

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.


Click here to read  the original article on TODO Comment



No comments:

Post a Comment