C# 2010 offers powerful new features, and this book is the fastest path to mastering themand the rest of C#for both experienced C# programmers moving to C# 2010 and programmers moving to C# from another object-oriented language. Many books introduce C#, but very few also explain how to use it optimally with the .NET Common Language Runtime (CLR). This book teaches both core C# language concepts and how to wisely employ C# idioms and object-oriented design patterns to exploit the power of C# and the CLR.
This book is both a rapid tutorial and a permanent reference. You'll quickly master C# syntax while learning how the CLR simplifies many programming tasks. Youll also learn best practices that ensure your code will be efficient, reusable, and robust. Why spend months or years discovering the best ways to design and code C# when this book will show you how to do things the right way from the start?
- Comprehensively and concisely explains both C# 2008 and C# 2010 features
- Focuses on the language itself and on how to use C# 2010 proficiently for all .NET application development
- Concentrates on how C# features work and how to best use them for robust, high-performance code
What youll learn
- How C# works with and exploits the CLR
- How to use arrays, collections, and iterators
- How to handle events with delegates and anonymous functions
- How to design and use generic types and methods
- How to thread efficiently and robustly
- How C# anonymous types, lamba expressions, and extension methods work and how to use them
Who this book is for
If you're an experienced C# programmer, you need to understand how C# has changed with C# 2010. If you're an experienced object-oriented programmer moving to C#, you want to ramp up quickly in the language while learning the latest features and techniques. In either case, this book is for you. The first three chapters succinctly present C# fundamentals, for those new to or reviewing C#. The rest of the book covers all the major C# features, in great detail, explaining how they work and how best to use them. Whatever your background or need, youll treasure this book for as long as you code in C# 2010.
Table of Contents
- C# PreviewC# and the CLRC# Syntax OverviewClasses, Structs, and ObjectsInterfaces and ContractsOverloading OperatorsException Handling and Exception SafetyWorking with StringsArrays, Collection Types, and IteratorsDelegates, Anonymous Functions, and EventsGenericsThreading in C#In Search of C# Canonical FormsExtension MethodsLambda ExpressionsLINQ: Language Integrated QueryDynamic Types