Tag: Visual Studio

C# Comments

This is another of my pet peeves when looking at other people’s code. If you add a comment, using the double forward-slash //, then add a freaking space after // to make it stand out from code that has been commented out. It pisses me off right, left and center to see this:

//TODO blah, blah

…or this:

//Here is where you add...

Why not just do this, so flipping simple:

// TODO:

This will avoid any potential mistake when glancing over the code, where the code below has is clearly commented out code, and the first examples above are not:

//var numDays = int.Parse(Console.ReadLine());
//var numPeople = 5;
//var numPeopleShared = 0;

Do feel free to share your opinion and experience on the same.