C# Coding Standards document
Version 1.5
Why create yet another coding standard document?
There have been numerous attempts to document C# Coding Standards since the language was released, but most are either overly verbose, too restrictive, or try to cover every single scenario. This is my attempt to start from scratch and write a new standards document that is concise, simple to read & use, and creates a pragmatic balance of rule enforcement. Having said that, I'm sure that many of you will have just as many disagreements with this document as I have with others, but I am always up for a good debate.
Goals and objectives:
- Cover all major C# Language features.
- Provide guidelines on coding style & language usage (but not syntax)
- Demonstrate all rules in code where applicable.
- Describe rules in structure that is easy to read & use.
- Define clear & concise rules.
- Use consistent terminology & rule patterns.
- Only provide rules where there is a clear cut best practice.
- Lead developers to a "pit of success" and avoid common "pits of failure"
Release Notes:
v1.15 - 03/01/2007
- Added numeric datatype usage guidelines.
- Adjusted guidelines for public, protected, and internal access modifiers.
- Tweaked verbage throughout document.
v1.13/a - 08/17/2004
- Modified layout & added License Agreement. Misc. grammar adjustments.
- Removed rules on foreach vs for pending additional research.
- Added rules on switch/case statements.
- Revision(a) recommends custom Exceptions to subclass Exception not ApplicationException
v1.12 - 06/30/2004
- Modified code commenting and formatting rules.
- Modified various code examples.
- Modified Exception Handling and Flow Control sections.
v1.11 - 06/08/2004
- Modified formatting.
- Restructured “Language Usage” section.
- Corrected language, and added code examples.
- Consolidated conflicting rules.
v1.10 - 05/25/2004
- Modified naming conventions for Internal and Protected identifiers.
- Added, modified, & removed misc rules.
- Corrected grammar, code, and some verbiage.
v1.09 - 05/23/2004
- Changed style & formatting.
- Added Quick Summary tables.
- Added/modified various standards.
v1.08 - 05/20/2004
- Split .NET guidelines into separate document.
- Changed overall scope and goals. Restructured sections. Improved Introduction.
- Added Scope and Terminology sections.
v1.07 - 05/11/2004
- Added Bibliography, Resources, and .NET Framework Guidelines.
v1.06 - 05/10/2004
- Misc. adjustments to various rules.
v1.05 - 05/10/2004
- Updated Naming Conventions.
v1.04 - 05/09/2004
- Misc. grammar and syntax changes.
v1.03 - 05/09/2004
- Changed formatting and organization.
v1.02 - 05/09/2004
- Added code examples.
v1.01 - 05/09/2004
- Added more Language Usage.
v1.00 - 03/01/2004
- Created