Book description
C# in Depth is designed to bring you to a new level of programming skill. It dives deeply into key C# topics—in particular the new ones. You'll learn to reuse algorithms in a type-safe way with C# 2 generics and expand the functionality of existing classes and interfaces using C# 3 extension methods. Tricky issues become clear in author Jon Skeet's crisp, easy-to-follow explanations and snappy, pragmatic examples. With this book under your belt, you will easily learn—and then master—new frameworks and platforms.
About the Technology
In programming, there's no substitute for knowing your stuff. In versions 2 and 3, C# introduces new concepts such as lambda expressions and implicit typing that make the language more flexible and give you more power. Using Language INtegrated Query (LINQ)—also new in C# 3—you can interact with data of any type directly from C#. Simply put, mastering these features will make you a more valuable C# developer.
About the Book
What's Inside
- How and where (and why) to use the new language features
- Backgrounder on C# 1
- Cutting-edge best practices
- Become comfortable and proficient with C# 2 and 3
About the Reader
About the Author
Jon Skeet has worked with C# since 2002, and has been a Microsoft C# MVP since October 2003. He has spent a great amount of time in the C# community answering questions in newsgroups as well as writing articles on the most misunderstood aspects of C# and .NET. After having read tens of thousands of questions over the years, Jon has developed a deep insight into the areas that developers have trouble with, as well as what they are trying to achieve. A keen reader of specifications, Jon aims to understand the language at the deepest level, which enables him to provide a detailed exposition of C#, including a few dark corners which can trip up the unwary developer.
Quotes
Become a C# 3 maestro!
- Fabrice Marguerie, C# MVP author of LINQ in Action
The best C# book I've ever read.
- Chris Mullins, C# MVP
Clear and concise.
- Robin Shahan, GoldMail.com
A treat!
- Anil Radhakrishna, ASP.NET MVP
Reveals C#'s powerful mysteries.
- Christopher Haupt, BuildingWebApps.com
So good, it hurts my head.
- J.D. Conley, Hive7 Inc.
Enriches the beginner, polishes the expert.
- Josh Cronemeyer, ThoughtWorks
Table of contents
- Copyright
- Foreword
- Preface
- Acknowledgments
- About This Book
- About the Cover Illustration
- Comments from the Tech Review
-
1. Preparing for the journey
- 1. The changing face of C# development
-
2. Core foundations: building on C# 1
- 2.1. Delegates
- 2.2. Type system characteristics
- 2.3. Value types and reference types
- 2.4. C# 2 and 3: new features on a solid base
- 2.5. Summary
-
2. C#2: solving the issues of C#1
-
3. Parameterized typing with generics
- 3.1. Why generics are necessary
- 3.2. Simple generics for everyday use
- 3.3. Beyond the basics
- 3.4. Advanced generics
- 3.5. Generic collection classes in .NET 2.0
- 3.6. Limitations of generics in C# and other languages
- 3.7. Summary
- 4. Saying nothing with nullable types
-
5. Fast-tracked delegates
- 5.1. Saying goodbye to awkward delegate syntax
- 5.2. Method group conversions
- 5.3. Covariance and contravariance
- 5.4. Inline delegate actions with anonymous methods
-
5.5. Capturing variables in anonymous methods
- 5.5.1. Defining closures and different types of variables
- 5.5.2. Examining the behavior of captured variables
- 5.5.3. What’s the point of captured variables?
- 5.5.4. The extended lifetime of captured variables
- 5.5.5. Local variable instantiations
- 5.5.6. Mixtures of shared and distinct variables
- 5.5.7. Captured variable guidelines and summary
- 5.6. Summary
- 6. Implementing iterators the easy way
- 7. Concluding C# 2: the final features
-
3. Parameterized typing with generics
-
3. C# 3—revolutionizing how we code
-
8. Cutting fluff with a smart compiler
- 8.1. Automatically implemented properties
- 8.2. Implicit typing of local variables
- 8.3. Simplified initialization
- 8.4. Implicitly typed arrays
- 8.5. Anonymous types
- 8.6. Summary
- 9. Lambda expressions and expression trees
-
10. Extension methods
- 10.1. Life before extension methods
- 10.2. Extension method syntax
- 10.3. Extension methods in .NET 3.5
- 10.4. Usage ideas and guidelines
- 10.5. Summary
- 11. Query expressions and LINQ to Objects
-
12. LINQ beyond collections
- 12.1. LINQ to SQL
- 12.2. Translations using IQueryable and IQueryProvider
- 12.3. LINQ to DataSet
- 12.4. LINQ to XML
- 12.5. LINQ beyond .NET 3.5
- 12.6. Summary
- 13. Elegant code in the new era
-
8. Cutting fluff with a smart compiler
- LINQ standard query operators
Product information
- Title: C# in Depth
- Author(s):
- Release date: April 2008
- Publisher(s): Manning Publications
- ISBN: 9781933988368
You might also like
book
C# in Depth, Third Edition
C# in Depth, Third Edition updates the best-selling second edition to cover the new features of …
book
C# in Depth, Fourth Edition
C# in Depth, Fourth Edition is your key to unlocking the powerful new features added to …
book
C# in a Nutshell
C# in a Nutshell provides everything programmers need to know about the C# language in one …
book
C# 9.0 in a Nutshell
When you have questions about C# 9.0 or .NET 5, this best-selling guide has the answers …