Getting On Task: Todo Code Review This // Todo Code Review This
Getting On Task: Todo Code Review This // Todo Code Review This
Use the Visual Studio Task List to keep track of a simple list of to-do items. The Task List window displays two kinds of tasks: User tasks: Tasks entered directly into the Task List window Task comments: Comments placed in your source code using special tags The Task List provides a consolidated list of tasks you enter directly into the Task List window and tagged comments you place inside your source code. The default set of tags you use to mark your comments comprises TODO, HACK, or UNDONE. You can create your own custom tags. To tag a comment within your source code, use the standard comment mark for your programming language, followed by one of the task comment tags. For example, to add a task comment in Visual Basic or C#, you type the following: VB:
todo Code review this
C#:
// todo Code review this
134
The Task List window consolidates all your task comments in a single view. You can double-click a comment in the Task List to jump to the location in the source code where the comment appears. To open the Task List window, click Task List on the View window. Figure 1-6 shows an example of the Task List window.
Figure 1-6: Task comments from source code appear in the Task List window.
Always check the Task List for code samples you download from Microsoft and other third parties. The samples usually include a list of tasks you need to complete in order to use the sample. You can add your own task comment tags. Figure 1-6 uses a comment tag called TODO. To add your own task comment tags, do the following: 1. Choose Tools Options. 2. Expand the Environment folder. 3. Click Task List. 4. Type a name for the comment tag in the Name text box. 5. Click the Add button. Your new comment tag appears in the list. 6. Click OK.