Published: 21 May 2007
By: Granville Barnett

Granville Barnett reviews the excellent Essential C# 2.0 book written by Mark Michaelis.

Written by: Mark Michaelis
Pages: 768
Publisher: Addison-Wesley
ISBN: 0-321-15077-5

 

 

 

 

 

 

 

 

 

Introduction

With so many books on the C# language out there you really need to know which one is the best to buy – I have been in the fortunate position to read pretty much all the books ever written on the C# programming language (I’m sure a few have escaped my attention though!).

Many books on C# spend a proportion of time on the actual language and its constructs and then focus more on the .NET framework, whether that is ASP.NET, Windows Forms, WPF, etc.

There comes a time when we as developers simply want a quick reference guide to the C# language – Essential C# 2.0 on the face of things seems to be a candidate for this mantle.

What Essential C# 2.0 is

Before we actually talk about the book I will clear one thing up – Essential C# 2.0 is not a book that should be compared with the awesome CLR via C# by Jeffery Richter. Essential C# 2.0 is simply a reference guide to the C# language, nothing else.

When I think of a book specifically on C# 2.0 I expect it to cover, the new features of the language like generics, anonymous methods, etc. As well as the new stuff, we as readers would no doubt appreciate the odd chapter on multithreading, exceptions, events, etc...

Like I said previously I don’t expect Essential C# 2.0 to go into the same depth that CLR via C# does, but I do expect the book to go deep when necessary to explain a particular topic well. This review is based on many things, given that I have read so many programming books on the C# language (and others!) I believe I know what a good language reference book is. As well as what I would consider good, I also need to consider the level of programmer this book is targeted at and whether it is good for them.

Language coverage

When I read Essential C# 2.0 I wasn’t really surprised about the coverage the book had of the language. All C# books tend to cover pretty much the same topics: Classes, Events, Inheritance, Generics, Reflection, etc. I think I would be quite safe in saying that apart from the odd chapter pretty much all books on C# cover the same stuff – but how well? That is the real question.

One of the things I first noticed about the code samples in the book is the lack of visibility the author gives in his code samples, e.g. Michaelis defines a class but forgets to give the class a visibility leaving the compiler to decide. The same goes for methods throughout the text – this is not good practice! This is a lazy habit and bad programming – leaving the compiler to decide the visibility of your classes and methods should never be employed in any application no matter how big or small.

On the whole Michaelis uses good examples to demonstrate the various features of the language. I’m not going to list everything that the book covers, that is a job best done by Amazon. Although Michaelis made a few best practice errors in his book, for the most part he demonstrated the language very efficiently with decent explanations of the particular feature of the language.

Advanced topics

I wanted to spend a little time going over some of the parts of the language that are considered advanced e.g. Calling native functions of the Windows API, and multithreading.

Each of the above are considered advanced, although the concept of each and practice can be very simple, they can also be quite complex – more so doing it properly can be fairly complicated.

There are two chapters dedicated to threading, this is nice to see as multithreaded applications are commonplace in application development especially when programming applications that undertake fairly long operations as part of their use. I’m not going to say that if you read these two chapters you will be an expert at designing and implementing multithreaded applications – you won’t, but they do give you a good grounding on how you may best go about doing so.

Invoking platform specific functions of the Windows API will always be considered a fairly complex task as you call unmanaged code from managed code. P/Invoke has a single chapter in this book, this is by no means enough to learn how to best interoperate with the platform. It is a good starting point though.

All in all I felt the complex features of the language were addressed well, but they are by no means a definitive reference – each of the topics themselves deserve a devoted book, and in fact such books exist.

Summary

Essential C# 2.0 is by far the best general purpose book on the C# 2.0 language and I highly recommend it. Overall the book is well structured, the examples are clear and the book is well written.

This book is suitable for programmers of all skills; however, mileage will vary accordingly. If you only have the cash for one book on the C# 2.0 language then go for this.

<<  Previous Article Continue reading and see our next or previous articles Next Article >>

About Granville Barnett

Sorry, no bio is available

This author has published 32 articles on DotNetSlackers. View other articles or the complete profile here.

Other articles in this category


C# 4.0 Reflection Programming - Part 3
In the previous article, we used the reflection to obtain the information of an assembly, module, ty...
C# 4.0 Reflection Programming - Part 4
In this last article of this series, we will learn what to do with reflection. But before making the...
C# 4.0 Reflection Programming - Part 2
As introduced in the first article, the most typically-used tools associated with .NET reflection ar...
Understanding and Using Extension Methods
Extension methods were new to C# 3.0. They allow you to add a method to an existing type without hav...
Introduction to C# 3.0 features
C# 3.0 introduced some of very useful features built on top of 2.0. This article explains the usage,...

You might also be interested in the following related blog posts


[Book review] Essential Silverlight 3 read more
November's Toolbox Column Now Online read more
What is Softwaremaker doing now ? read more
Review: ASP.NET MVC 1.0 Quickly read more
Book review: Essential Silverlight 3 read more
October's Toolbox Column Now Online read more
ASP.NET MVC in Action spotted at Barnes and Noble read more
ASP.NET MVC in Action arrived at my doorstep today read more
September's Toolbox Column Now Online read more
Live and well read more
Top
 
 
 

Please login to rate or to leave a comment.

Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.