Task List Feature of Visual Studio Framework

This is all about Task list window which is helpful in managing our comments within the code.

Introduction

This is my first .NET article on CodeProject. This is all about Task list window which is helpful in managing comments. Most of us are not aware of this feature. That’s why I decided to write an article on this feature of the VS framework.

Task List

Task list is nothing but an integrated to-do list within the Visual Studio framework. We can use Task list feature of VS framework to create 3 types of tasks.

All the three tasks are listed in the dropdown of Task list window [Fig 2].

Figure 2: Task list window with category list

1. Comments

Comments are the tasks that we want to perform in the code. Suppose we want to create a function which returns the addition of two integers. And this task remains uncompleted because of some other task. We can add a comment using TODO and later perform this task. [As given in Fig 3]:

Figure 3: Comments task list window with TODO comment

Here TODO is nothing but an identifier and any comment that starts with TODO is listed in the Comment window of the task list. TODO is one of the identifiers that is in Visual Studio by default. We can create an identifier of our own. Click Tools -> Options. In the Options dialog, select Environment -> Task List option. Enter name of the identifier in the name box and click add. We can set the priority of an identifier by selecting priority dropdown list.

Figure 4: How to add user defined identifier

After creating the Test1 identifier, we can use it in our code as shown in Fig 5. It is added in the comments task list window. If we double click the comments task, we can jump to the line of code where we place the comment.

Figure 5: User defined identifier example in Comments

2. Shortcuts

Shortcut tasks are nothing but links to the line of code within the project. They are similar to bookmarks. We can jump to the line of code by clicking the shortcut task of task list window.

If we completed a particular shortcut task, just check the checkbox associated the task. This is only for our information.

Figure 6: Shortcut symbol and Shortcut window

3. User Tasks

User task are the tasks that the user wants to do. It's either personal or project related he/she wants to list. User tasks are directly entered in the task list window. We need to click a button near the category dropdown list to add a new user task as shown in Figure 6.

If we completed a particular user task, just check the checkbox associated with the task.

Figure 7: User tasks window

Summary

This article is for entry level programmers who do not know the Task list feature of Visual Studio .NET Framework.

Share

About the Author

Sandesh has a 6 years of total professional experience in a software development. He first handled the computer in his school days when he was in 7th std working on Lotus. In summer vacation, the school authorities allowed him and other students to use the computers for practicing Lotus and playing different games .

He has done computer engineering. Currently he is working in Net 4.0 framework. Even though he is using .Net 4.0 framework for development but still he has not got a chance to work with newer technologies like MVC, WCF etc. However he always try to learn these technologies from his end and eagerly waiting for a chance to work with the newer technologies like MVC, WCF and Silverlight etc.

What the title says.
I give it a 4. Good information, the screenshots make it clear too.

Few questions though.
What happens if I create a user defined identifier for a task, like 'Test'. Will my other team members be able to see it in their task list or will it appear as just any random comment to them?
And is it possible to add a user defined task for team members? So instead of me looking for tasks that start with // TODO Naerling I want to show only tasks for me. That way you could also add or view tasks for other team members. For example // TODO John Doe This function still needs proper error handling.
That would be nice features

I agree. I knew about this and use it here and there currently and it is handy (todo's). I discovered it by accident so I would bet that a fair amount of people will be introduced to this by the article.

I mean come on, if only a percentage of 8 million viewers see it. . . .

I've been coding long before Visual Studio even existed and I've never taken the time to look into this feature. Too busy actually writing code, managing and designing projects, etc..
This may not be an earth shattering article but it points out a nice feature of VS that I'll now go look into. Perfect way to start one's publishing career.