The Elements of C# Style
What’s the best book discussing the proper writing of .NET code in general and C# in particular? I’m thinking of something along the lines of Joshua Bloch’s Effective Java, but for C# instead of Java. That is, I want a book that assumes I already know the basic mechanics of the language, and am quite familiar with general object oriented principles like polymorphism, but need to know things such as “classes begin with lower case letters and methods begin with upper case letters.”
Here are a few possibilities:
Has anybody read any of these? Would you recommend one over the others? or a different book completely?
July 2nd, 2006 at 5:17 PM
I like Effective C# very much. It’s clear, to the point, and has been extremely useful for the work I’ve done recently. I wish it had existed when I first worked with C#.
July 2nd, 2006 at 7:40 PM
Definitely check out Brad Abrams’ Framework Design Guidelines. It goes beyond the language – it tackles issues in the runtime as well as with the class libraries. The best part of the book are the annotations – so you can see that things are contentious even though the book takes a stance. The discussions on interfaces vs. abstract base classes are extremely insightful.
July 6th, 2006 at 2:39 AM
Programming .NET Components (Oreilly) has an appendix called “C# Coding Standard” if you are after code conventions (it’s also a pretty good book).
July 12th, 2006 at 5:16 AM
The coding standard from the O’Reilly book mentioned above is available from the author’s website: http://www.idesign.net/idesign/download/IDesign%20CSharp%20Coding%20Standard.zip