In my view, there is not hard and fast rule and a certain standard set by any standard body that should be used. Coding standard is all about writing good code that may contain
- neat and clear
- easily readable
- well commented
- easily understandable
- proper naming convention used
- no unused variables are declared
- Unmanaged objects are disposed properly to avoid memory leak
- Proper and suitable conditional statements are used
- Proper and suitable loops statements are used
You may have noticed that different project/companies may have their own coding standards. Many of the points might be almost or near to same but some points might be different.
As long as your code abide by above points (there are many more) and you maintain uniformity throughout the project, you should be fine.
As said your company/project coding standard might have already been defined so you should follow that. Vuyiswa has a post on this http://www.dotnetfunda.com/feature/x-14/1766/coding-standards
, you can have a look at it. You can google it too and you will find many coding standard documents, you may follow them if you or your company like.
Hope this helps
Nuwan, if this helps please login to Mark As Answer. | Alert Moderator