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?

4 Responses to “The Elements of C# Style”

  1. Jez Higgins Says:

    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#.

  2. John Lam Says:

    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.

  3. Nick Poole Says:

    Programming .NET Components (Oreilly) has an appendix called “C# Coding Standard” if you are after code conventions (it’s also a pretty good book).

  4. Tim Duncan Says:

    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

Leave a Reply