C# 4.0 in a Nutshell: The Definitive Reference

Front Cover
"O'Reilly Media, Inc.", Jan 20, 2010 - Computers - 1060 pages
4 Reviews

What people are saying about C# 4.0 in a Nutshell

"C# 4.0 in a Nutshell is one of the few books I keep on my desk as a quick reference. It is a book I recommend."--Scott Guthrie, Corporate Vice President, .NET Developer Platform, Microsoft Corporation

"A must-read for a concise but thorough examination of the parallel programming features in the .NET Framework 4."--Stephen Toub, Parallel Computing Platform Program Manager, Microsoft

"This wonderful book is a great reference for developers of all levels."-- Chris Burrows, C# Compiler Team, Microsoft

When you have questions about how to use C# 4.0 or the .NET CLR, this highly acclaimed bestseller has precisely the answers you need. Uniquely organized around concepts and use cases, this fourth edition includes in-depth coverage of new C# topics such as parallel programming, code contracts, dynamic programming, security, and COM interoperability. You'll also find updated information on LINQ, including examples that work with both LINQ to SQL and Entity Framework. This book has all the essential details to keep you on track with C# 4.0.

  • Get up to speed on C# language basics, including syntax, types, and variables
  • Explore advanced topics such as unsafe code and preprocessor directives
  • Learn C# 4.0 features such as dynamic binding, type parameter variance, and optional and named parameters
  • Work with .NET 4's rich set of features for parallel programming, code contracts, and the code security model
  • Learn .NET topics, including XML, collections, I/O and networking, memory management, reflection, attributes, security, and native interoperability

What people are saying - Write a review

User Review - Flag as inappropriate

This book is the definitive desk reference for the C# language. Whether you are a beginner or a seasoned C# programmer this book is a definite must. The book is laid out in a way making it readable from beginning to end building upon concepts and explained syntaxes, or as a reference guide that can explain a concept on it’s own if looked up directly.
The coding examples are usually easy to follow and understand and simply abstract the concept they are explaining.
This book covers all of the new features in C# 4.0 – the items I found most interesting were code contracts, truples, optional parameters.
Weighing in at over 1000 pages – the book can be a little overwhelming, but once you dive into it you find that the subject matter flows well and is not over presented. There is just that much to know about C#. And even if you have been programming in C# for years there is really no chance you know it all.
So pick up this book and find out what you didn’t know.

User Review - Flag as inappropriate

Personally these books are the best in the market. The way they explain the topics and content of the books basically surpass all other competitors in the market right now.


Chapter 1 Introducing C and the NET Framework
Chapter 2 C Language Basics
Chapter 3 Creating Types in C
Chapter 4 Advanced C
Chapter 5 Framework Overview
Chapter 6 Framework Fundamentals
Chapter 7 Collections
Chapter 8 LINQ Queries
Chapter 16 Serialization
Chapter 17 Assemblies
Chapter 18 Reflection and Metadata
Chapter 19 Dynamic Programming
Chapter 20 Security
Chapter 21 Threading
Chapter 22 Parallel Programming
Chapter 23 Asynchronous Methods

Chapter 9 LINQ Operators
Chapter 10 LINQ to XML
Chapter 11 Other XML Technologies
Chapter 12 Disposal and Garbage Collection
Chapter 13 Diagnostics and Code Contracts
Chapter 14 Streams and IO
Chapter 15 Networking
Chapter 24 Application Domains
Chapter 25 Native and COM Interoperability
Chapter 26 Regular Expressions
Appendix C Keywords

Other editions - View all

Common terms and phrases

About the author (2010)

Joseph Albahari is author of C# 3.0 in a Nutshell, LINQ Pocket Reference, and C# 3.0 Pocket Reference. He has been developing large-scale enterprise applications on .NET and other platforms for more than 15 years, and is author of LINQPad - the popular utility for querying databases in LINQ.

Joseph is currently a freelance consultant.

Joseph's Home Page

Ben Albahari is the founder of Take On It. He was a Program Manager at Microsoft for 5 years, where he worked on several projects, including the .NET Compact Framework and ADO.NET.

He was the cofounder of Genamics, a provider of tools for C# and J++ programmers, as well as software for DNA and protein sequence analysis. He is a co-author of C# Essentials, the first C# book from O'Reilly, and of previous editions of C# in a Nutshell.

Bibliographic information