Code reviews have a way of collecting comments that have nothing to do with whether the code works. A private field called lines where the reviewer expected _lines . A one-line if with no braces. Someone replies, someone else replies to the reply, and by the end of the thread two people who agree on everything that matters have spent their attention on the part that matters least.
The usual cure is a style document. A page gets written, everyone agrees with it, and the same comments keep appearing in review, because a page cannot fail a build.
The guide I'm introducing here takes the other road. Each rule names the setting that makes the compiler or the editor check it, where one exists, so most of those comments become build errors on the author's machine before a reviewer sees the diff.
What the guide is
The C# Code Style Wiki is free and open on GitHub, and it is also published as a site. It gives one answer per C# style question.…