Book Review: C# 3.0 In a Nutshell [O'Reilly]


By Peter Bromberg
Printer Friendly Version
  

Review of the Albahari Bros. new reference book from O'Reilly.



 

C# 3.0 In a Nutshell is a very concise and thorough reference to C# 3.0 programming. Unlike earlier editions, the book is now organized entirely around concepts and use cases, providing greater depth and readability. There are dark grey "side tabs" along the right side of the book that make finding a particular subject much easier.

One of the first things I look at in a new technical book is the list of acknowledgments in the preface, to see who the editors and technical reviewers were. In this one, you'll see familiar and respected names such as Kryzysztof Cwalina, Brad Abrams, Sam Gentile, and Adam Nathan. And Nicholas Paldino, who I have come to respect for his incredible breadth of knowledge, gets a special mention. With folks having these kinds of credentials helping you on your book, the Albahari brothers, who have been doing this for a long time, have a real winner.

C# 3.0 introduces the most significant enhancements yet to the programming language, and C# 3.0 in a Nutshell goes deep into the subject while assuming minimal prior knowledge of C# -- and that makes it accessible to anyone with a reasonable background in programming. In addition to the language, the book covers the .NET CLR and the core Framework assemblies, along with the unified querying syntax called Language Integrated Query (LINQ), which bridges the traditional divide between programs and their data sources.

LINQ is important because it is not an "add-on"; it's now part of the C# language, and with Entitity Framework, it will change the landscape of data access. This book is crammed full of valuable, detailed information on LINQ. And one of the coolest features of the book is "LINQPAD" - a downloadable LINK Harness. To quote from the authors:

"If you think that you understand LINQ—or would like to—then I invite you to take the LINQPad challenge. The rules are simple:

  1. Locate the shortcut for SQL Management Studio on your Start Menu and move it some place else.
  2. In its place, insert a shortcut to LINQPad.
  3. For the next week, perform all your ad-hoc SQL queries using only LINQPad.

At the end of the week, you will actually think in LINQ, rather than thinking in SQL and translating to LINQ. (LINQPad also allows old-fashioned SQL queries for tasks are genuinely impossible or clumsy in LINQ. You'll feel an unpleasant sense of failure, though, should you cheat and use this feature frivolously :)

If you can write all your ad-hoc queries in LINQ, you have a big head-start over everyone else in C# 3.0, LINQ and LINQ to SQL. (Further, LINQPad gives you a knowledge of LINQ that does not depend on Intellisense, and so will not fall to pieces at job interviews!) And continued use of LINQPad will keep your LINQ knowledge alive—if you're not lucky enough to be using LINQ in your current projects."

This is a true reference book, designed to  provide a map of C# 3.0 knowledge in a succinct and unified style. The only earlier book I can compare the style to is "C# Programmers  Reference" by Grant Palmer. This new book will most likely replace my very dog-eared copy of that.

The opening chapters concentrate purely on C#, starting with the basics of syntax, types and variables, then finishing with advanced topics such as unsafe code and preprocessor directives.

Later chapters cover the core .NET 3.5 Framework, including such topics as LINQ, XML, collections, I/O and networking, memory management, reflection, attributes, security, threading, application domains and native interoperability. There is also a downloadable chapter on COM Interop on the O'Reilly site. If you are interested in LINQ and the 3.5 Framework, this book will definitely get you to "first base". I know it's helping me.

The book was designed as a handbook for daily use; you will definitely have this one handy on your desk as you work because you'll refer to it often. I know I will. Highly recommended.

 



Biography
Peter Bromberg is a C# MVP, MCP, and .NET expert who has worked in banking ,financial and telephony for 20 years. Pete focuses exclusively on the .NET Platform, and his samples at GotDotNet.com have been downloaded over 56,000 times. Peter enjoys producing 3D raytraced digital photo collage with Maya, the beach, and fine wines. You can view Peter's UnBlogIttyUrl, and BlogMetafinder sites.
Please post questions at forums, not via email!

button
 
Article Discussion: Book Review: C# 3.0 In a Nutshell [O'Reilly]
  Peter Bromberg posted at 23-Oct-07 01:41
Original Article