Home
C#
Comment TODO: Visual Studio
Updated Dec 18, 2024
Dot Net Perls
TODO Comments. Programs are complicated—when in development, many tasks need remembering. We track them in Visual Studio with TODO comments.
These comments help organize our projects. We list to-do items in a central place. Variations on the "TODO" syntax are supported, so this feature is more usable.
TODO comments allow Visual Studio to maintain a central list of tasks, which it reads from many different places. The Task List shows all the TODO comments in your project.
Tip To open the list, go to View, and then Task List. A recent version of Visual Studio is needed.
Here We see some examples of TODO lines that Visual Studio will notice and put into its special Task Pane.
class Program
{
    public static void Main()
    {
        //todo: fix dialog windows
        //TODO: work on SQL guide
        // Todo new screenshot
        System.Console.WriteLine("OK");
    }
}
OK
Visual Studio Code. With Visual Studio Code, there is minimal support for "todo" without installing an extension. A file named todo will have a special "check box" icon.
Tip Open the extensions pane in VS Code, and search for "todo." Various extensions can provide todo management features.
Example todo file names:

"Todo Tree"
"TODO-Highlight"
"todo"
...
Syntax info. Note that you have some flexibility with these tokens. The strings "todo," TODO and TODO all work equally well. Visual Studio's parser allows some variation.
Summary. We looked at TODO comment syntax in the Visual Studio IDE. You can go through your project and put TODO comments everywhere you need to do something.
UNDONE and HACK are a couple other predefined comment tokens. Experiment and find what suits your style the best, so you can be as productive as you want to be.
Dot Net Perls is a collection of pages with code examples, which are updated to stay current. Programming is an art, and it can be learned from examples.
Donate to this site to help offset the costs of running the server. Sites like this will cease to exist if there is no financial support for them.
Sam Allen is passionate about computer languages, and he maintains 100% of the material available on this website. He hopes it makes the world a nicer place.
This page was last updated on Dec 18, 2024 (simplify).
Home
Changes
© 2007-2025 Sam Allen