Home
C#
Comment TODO: Visual Studio
This page was last reviewed on 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 tested code examples. Pages are continually updated to stay current, with code correctness a top priority.
Sam Allen is passionate about computer languages. In the past, his work has been recommended by Apple and Microsoft and he has studied computers at a selective university in the United States.
This page was last updated on Dec 18, 2024 (simplify).
Home
Changes
© 2007-2024 Sam Allen.