Filed under: Software
I’ve recently come across a very exciting feature in Visual Studio, which I thought the whole world should be famiiar with, or at least every .NET Developer using Visual Studio. As many other programmers may do, when I want to call a method that I haven’t implemented yet, I normally just stub that method and throw a NotImplementedException in its body. Although this may be a nice way of being reminded of a method not having been implemented, the problem is that on many occasions the testers would be the ones receiving the exception when they run the code.
In an effort to reduce the risk of that happening and more importantly to have a centralized view of all the tasks left for you to do in your code, you can use Visual Studio’s Task List. Whenever you feel that a portion of code deserves revisiting, you simply add a comment and precede it by one of the default keywords:
//TODO I still need to implement this method.
//HACK I have to rewrite this method as it is plain ugly.
//UNDONE This code needs to be uncommented.
Now open your Task List in Visual Studio: View > Task List. Select “Comments” in the combo box at the of the Task List window and you should see the comments that you’ve sprinkled all across your code. You can, if you wish, add your own custom keywords from: Tools > Options > Environment > Task List.
You could if you like develop your own Visual Studio tool, using the Visual Studio SDK, to manage the Task List. This is how I got to find out about the Task List in the first place, but that’s beyond the scope of this post.
3 Comments so far
Leave a comment
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
http://www.bingojoy.com...
Nice work – keep it up we’re enjoying your writting style over here!…
Trackback by www.bingojoy.com June 26, 2008 @ 9:05 pmmeccabingo…
This site is a mecca for interesting stuff – we all agree here that we like your writting style!…
Trackback by meccabingo June 26, 2008 @ 10:04 pmwww foxy bingo…
Great site – keep the posts coming! Bingo Bob…
Trackback by www foxy bingo July 4, 2008 @ 5:06 pm