March 13th, 2009
C# guidelines that improve your code quality - 1
I am inspired to better myself after reading Dennis Doomen’s freshly released coding guidelines for C# 3.0 . He provides a very nice PDF document that puts the dot to many common C# coding “confusions”. It addresses how to consistently name your variables, namespaces, classes and assemblies. He specifies when to declare a variable as static, as readonly and when to seal a class among others.
Another topic he pushes is code readability and ensuring that all code statements are as clear as possible.

You will often have your own way of doing things. A shared coding guideline is a good way to ensure that each member of your team is writing code styled as similar as possible.
If your company is looking at adopting a coding guideline for its C# development this would be a very good place to start.
At 32 pages it might seem a little long at first but it reads quickly and most topics should already be familiar if you do a lot of coding. Its companion quick reference guide neatly puts most key items onto a single page and makes for a great handout.
Tags: code guidelines









Except where otherwise noted, content on this site is
March 18th, 2009 at 11:08 pm
Maybe a look to our C# Handbook gives some more hints and ideas. Check the link below for more information about the handbook:
http://code.msdn.microsoft.com/encodocsharphandbook
Cheers,
Marc