About the Book
So what is C# 3.0 in a Nutshell and C# 4.0 in a Nutshell?
C# 3.0 in a Nutshell is a radical revision of the earlier O'Reilly book, C# in a
Nutshell, with a totally new format—making it easier to follow while explaining
topics in greater depth.
C# 4.0 in a Nutshell is an updated version of C# 3.0 in a Nutshell,
covering 4.0 language and CLR features including features, parallel programming,
code contracts and dynamic programming. C# 4.0 in a Nutshell is the product of
immense production effort - including 7 technical reviewers from Microsoft plus
Jon Skeet and Nicholas Paldino.
Where can I get these books?
You can get them online from
amazon.com, or your local
bookstore. C# 4.0 in a Nutshell is now in stock with Amazon.
I own another "in a Nutshell" book and it features a large
reference section with alphabetical listings of types and members. Is C# 3.0/4.0
in a Nutshell the same?
No: there are no computer-generated listings and no divorced reference section.
We believe in explaining everything clearly and concisely based on our
experience, with plenty of examples and real-world scenarios. We
maintain strict vigilance in keeping our examples short and clutter-free and follow a policy of
being useful and getting straight to
the point.
Can I see the table of contents and a sample chapter?
C# 3.0: Click here for a detailed Table of Contents;
click here
for the index.
C# 4.0: A TOC and index will be online shortly.
For a sample chapter, read
Threading in C#. The threading chapter in the book is a later revision of this article.
(C# 4.0 in a Nutshell also features a full chapter on Parallel Programming).
Aside from threading, what sections of the .NET
Framework does this book cover?
We cover the topics shown in the
circles below:
I already own book XYZ and am unhappy with its
level of detail. Does this book do better?
Most likely, yes! The reason, in a word, is focus.
We dedicate the entire book to what's inside the
circles shown above. This gives us space to do justice to difficult topics such as
security, application domains, Reflection.Emit, threading—and of course, LINQ. Books covering
everything in the diagram cannot offer the same
level of depth—this is why you might be frustrated. There's nothing wrong with
one-stop-shop books; it's just that they serve a different purpose.
Our focus in C# 3.0/4.0 in a Nutshell means we can answer such
questions as:
-
when is it advantageous to choose a static readonly field over a
constant?
-
when would you reimplement an interface, and what are the
alternatives?
-
what are the pitfalls of outer variables in lambda expressions?
-
how do you perform outer joins with SelectMany, and how does this differ
from the join operator?
-
what are the killer scenarios for using query expressions over
fluent syntax?
-
how do you tweak a parallel LINQ query for performance?
-
when shouldn't you dispose an object?
-
how do you programmatically get through forms-based
authentication?
-
when would you choose the XML serialization engine over the Data Contract
serializer?
-
why does the security transparency model exist, and what do you need to know as a
library developer?
-
how would you go about parsing IL so as to write a code
analysis tool or disassembler?
-
what's the trick to packaging a multi-DLL application as a single-file executable?
What is LINQ, and why is it important?
LINQ or Language INtegrated Query
is a set of language and framework features that allow you to write queries
directly in C# 3.0 and 4.0. LINQ drastically cuts the plumbing code required
for database applications while reducing runtime errors (LINQ queries are
statically type-checked by the compiler). LINQ can also query local
in-memory collections and XML trees, and (in Framework 4.0) LINQ greatly simplifies
parellel programming.
LINQ to SQL halves the cost of writing
and maintaining a data access layer. LINQ also provides a single unified query syntax that works
across databases, local collections, XML documents, ADO.NET data services, as well as third-party products.
C# 3.0 in a Nutshell and C# 4.0 in a Nutshell feature three chapters on LINQ. We
tell you what you need to know to write real-world queries over databases, local
collections and XML, and covering all the query operators in detail.
Are these books for beginners?
We've taken care not to alienate readers by
presuming too much prior knowledge. Nonetheless, these books assume
some general background in programming and so are aimed at intermediate and advanced
audiences. As a beginner you'll certainly benefit—but not as your
sole book. For something more introductory, I'd recommend a title such as
Head First C#, by Andrew Stellman and Jennifer Greene, or
Learning C# /
Programming C# by Jesse Liberty.
What are your credentials?
I have 17 years' experience in software development, and have
been working as a senior architect and developer on a wide range of commercial
projects in C# since its inception. Ben has worked for five years at Microsoft
as a program manager on three .NET teams, including ADO.NET and the
.NET Compact Framework.
The two of you have the same unusual surname...
are you related?
We're brothers.
How can I contact you?
Click here.