If your company (or your internal monologue) is anything like ours (or mine), you’ll find yourself going back and forth between coding standards as people try different things and debate the merits of the varying positions of a curly brace. We had a sort of defacto set of standards that people mostly followed (helped significantly by the wondrous Resharper), but what has been helpful for us is to draw up a document that everyone is (mostly) happy with and simply stick to it.

As we were doing this we discovered a document by Lance Hunt entitled C# Coding Standards for .NET which did exactly what we wanted and more. A couple of the ideas in Lance’s document were different to ours, but for uniformity’s sake we have now officially adopted his standards. What is also useful in this document is coding style guidelines which can be checked against in code inspections. The superbness of Resharper allows us then to set the formatting standards up and save them to a file which we can then apply to all solutions.

The drawback is that office conversation and debate for the timebeing has been reduced to more mundane topics, like sports.