Stolen from: http://aspnetwebstack.codeplex.com/wikipage?title=CodingConventions
= C# coding conventions =
In general, we have strived to use a style which is compatible with the out-of-the-box defaults for Visual Studio. In particular, this means we use Allman bracing style.
Some other rules we follow:
- Private fields are prefixed with an underscore and camel-cased.
- Always include curly braces around blocks, even when they would be optional.
- Using statements go at the top of the file, before the namespace declaration.
- Use of regions (#region) is not permitted.
- Using var is okay, if and only if the type is obvious (namely, for “new” statements, cast statements, or anonymous object).
- All production code must have associated unit tests.
- All new production code should have at least rudimentary XML doc comments.