Visual studio and .NET tip 4:- Task reminders using visual studio
By Shivprasad Koirala
 |
Access over 40 UI widgets with everything from interactive menus to rich charts. |
Many times we write comments in code to remind about certain tasks to be performed later and then we forget about the same as the comments gets lost in those million lines code.
Visual studio and .NET tip 4:- Task reminders using visual studio
Many times we write comments in code to remind about certain tasks to be performed
later and then we forget about the same as the comments gets lost in those million
lines code.
For instance in the below customer class you can see we have so many comments with
different nature of tasks which needs attention later. The way the below comments
are currently organized can be easily lost in the coming times.
// we have still not created any properties for this class
public class Customer
{
// I will come back and code this later
public void Add()
{
}
// For now i have done a hack to always return true
public bool IsValid()
{
return true;
}
// This methods needs to be merged with Add method
public void Update()
{
}
}
The above comments can be grouped by using task list token and later viewed in task
grid of visual studio. In your comments you can start inserting these tokens
as shown below.
// UNDONE :- we have still not created any properties for this class
public class Customer
{
// I will come back and code this later
public void Add()
{
}
// For now i have done a hack to always return true
public bool IsValid()
{
return true;
}
// This methods needs to be merged with Add method
public void Update()
{
}
}
Now if you click on view task list menu you should see your comments in the task
list window as shown below. The below task list view is much better as compared
to scattered comments.

You can also customize the token vocabularies and priorities by clicking on tools
– options – task list as shown in the below figure.

Related FAQs
Many times as a developer you come across functions with lots of input parameters as shown in the below code snippets. In real projects the input parameters would be much higher as compared to the below code snippets. Some times for various reasons you want to shuffle them, reorder them or remove some of them.
Many times due to project pressure and lazy attitude you violate encapsulation and create public variables for classes as shown below. Even though your inner heart knows that the best practice is to create set and get property function but your lazy attitude overrules it.
We all know exceptions get propagated from the last caller to the main caller. For instance let’s say from your static void main method you are calling “SomeMethod” and he in turn is calling “SomeMethod1”.
While debugging you often want to skip debugging on certain lines of code. For instance in the below code you have set the debug point to the first line, you would like to skip the in between lines and jump directly to “console.writeline” step.
In big project you have 100’s of classes and each of those classes can have lots of properties.
As developer debugging is your routine job and you would like your debugger to debug smartly rather than monotonously. For instance in the below code we have put a debug point and we do not want our debugger to just break monotonously.
Visual studio and .NET tip 4:- Task reminders using visual studio (1346 Views)