Tips and Guidelines
You will find writing code a fussy business. I have all kinds of conventions that I want you to follow. Frequently, I will not pause to justify these guidelines. Nevertheless, there is a reason for the guidelines, and it is always the same reason: Programming conventions are established to make the act of writing code easier.
When I first started writing code, I had many bad habits that I cured one by one as the result of painful experience. I want to spare you that pain by helping you establish good habits right from the start.
The Visual Studio IDE is designed to help you write code that follows the proper conventions. It will automatically help you format your code correctly. Sometimes, even with its help, your code will become messy. If that happens, choose Edit |Advanced | Format Document from the VS menu. The shortcut if Ctrl + E, D. You should always select this option immediately before turning in your code. The Format Document option will not fix all the formating, spacing and capitalization problems in your code, but it does help you move in the right direction.
Please see the tips below for additional information.