In a team atmosphere, the personal nature of coding style is a challenge.
The following example might explain the importance of coding style:
“The situation of a group of musicians trying to form a band. Each one comes in believing that their way of doing things is best (their “method” or “process”). The band will struggle so long as everyone is trying to do their own thing. It’s impossible to create good music unless everyone in the band agrees on the tempo, the style and who should take lead during a song. Anyone who has ever heard a high school band perform knows this to be true. Unless everyone is on the same page, you aren’t going to accomplish much.“Thus, we should start following a style guide. Following are the few style guides that I have in my list and I try to follow them.
- http://msdn.microsoft.com/en-us/library/ms229042.aspx Microsoft - Design Guidelines for Class Library Developers.
- http://www.idesign.net/idesign/download/IDesign CSharp Coding Standard.zip IDesign C# Coding Standard.
- http://www.danrigsby.com/Files/csharpcodingstandards.doc Dan Rigsby C# Coding Standards.
- http://submain.com/products/guidelines.aspx SubMain C# / VB.NET Coding Guidelines.
- http://weblogs.asp.net/lhunt/archive/2004/08/17/CSharpCodingStandardsv113.aspx Lance Hunt - C# Coding Standards.
- http://www.dotnetspider.com/tutorials/BestPractices.aspx DotNetSpider - C# Coding Standards and Best Programming Practices.
- http://msdn.microsoft.com/en-us/library/67ef8sbd.aspx Microsoft - C# Programming Guide.
- http://www.tiobe.com/content/paperinfo/gemrcsharpcs.pdf Phillips Medical Systems - Coding Standard C#. You can opt one and start extending it. Also, you might also have some experience or resources under your arsenal :D which you can share with team members.