Ishraq Ahmad
Blog for .net Architects & Developers looking to learn WPF, Silverlight, WCF and ASP.net MVC.
Visual Studio Tricks 1001
How to Add XML Comments
Type “///” three forward-slashes in front of class definition, method or property. Visual Studio automatically creates a XML formatted segment for you. You just need to provide description. Note: These comments are being used by VS.net to display information in intellisense.
Insert TODO
Sometimes you write some comments as a reminder of a task like code review, missing functionality, testing. VS.net gives you a power to insert TODO or comment tokens which gets compiled and VS.net organizes them in a list. Write “TODO:” infront of normal comments. For example,
/// TODO: Code review required.
foreach( string str in objList )
{
// …
}
Select View > Show Tasks > All from menu to see list of TODO comments.
Note: In C#, VS.net will open display TODO’s from currently open files. Where as in case of VB.net, you will see TODO’s in the entire solution.
No related posts.