Ensuring that developers follow best practices and write consistent code is a major challenge in today's software development projects. The act of documenting standards and practices is often skipped or overlooked. However, even in projects for which standards have been established, getting developers to read and follow those practices is another major challenge.
One of the best resources available for .NET developers is Microsoft's .NET Framework "Design Guidelines for Class Library Developers." These guidelines document Microsoft's (formerly) internal practices for developing class libraries and are freely available at http://www.msdn.microsoft.com/library/en-us/cpgenref/html/cpconnetframeworkdesignguidelines.asp.
The guidelines cover a wide range of subjects, including naming conventions, usage guidelines, and performance and security considerations. The importance of these guidelines cannot be overstated. When put into practice, they help ensure that your approach will be consistent with that of other developers. In addition, they have evolved over a number of years to reflect a considerable amount of knowledge, best practices, and lessons learned.
As useful as the design guidelines are, the reality of software creation is that many developers, due to lack of time or perhaps of interest, will not be familiar with their contents. The desire to automate the process of evaluating code for compliance with these guidelines led to the creation of FxCop.