Video description
"Jon doesn’t just explain how C# works; he explains how the whole thing holds together as a unified design, and also points out when it doesn’t."
From the Foreword by Eric Lippert, Facebook
C# in Depth, Fourth Edition is your key to unlocking the powerful new features added to the language in C# 5, 6, and 7. Following the expert guidance of C# legend Jon Skeet, you'll master asynchronous functions, expression-bodied members, interpolated strings, tuples, and much more.
The powerful, flexible C# programming language is the foundation of .NET development. Even after two decades of success, it's still getting better! Exciting new features in C# 6 and 7 make it easier than ever to take on big data applications, cloud-centric web development, and cross-platform software using .NET Core. There's never been a better time to learn C# in depth.
C# in Depth, Fourth Edition is a revised edition of the bestseller written by C# legend Jon Skeet. This authoritative and engaging guide is your key to unlocking this powerful language, including the new features of C# 6 and 7. In it, Jon introduces expression-bodied members, interpolated strings, pattern matching, and more. Real-world examples drive it all home. By the end of this awesome book, you'll be writing C# code with skill, style, and confidence.
Inside:- Comprehensive coverage of C# 6 and 7
- Greatest hits of C# 2–5
- Extended pass-by-reference functionality
- String interpolation
- Composition with tuples
- Decomposition and pattern matching
This book/course is made for for intermediate C# developers.
Jon Skeet is a senior software engineer at Google. He studied mathematics and computer science at Cambridge, is a recognized authority in Java and C#, and maintains the position of top contributor to Stack Overflow.
Provides an excellent overview of the evolution of C# with helpful and realistic examples that make learning the newest features of C# easy.
Meredith Godar, Innovative Software Engineering
This book has it all—from the beginnings of C# to insights on the future of the language and everything in between!
Willem van Ketwich, National Australia Bank
NARRATED BY DEREK LETTMAN
Table of Contents
Part 1. C# in context
Chapter 1. Survival of the sharpest
An evolving language
Ever more concise code
Balancing efficiency and complexity
An evolving platform
An evolving book
Part 2. C# 2–5
Chapter 2. C# 2
Generics
Generics save the day
What can be generic?
Type constraints
The default and typeof operators
Nullable value types
CLR and framework support: The Nullable struct
Language support Part 1
Language support Part 2
Simplified delegate creation
Iterators
The importance of being lazy
Implementation sketch
Minor features
Namespace aliases
Fixed-size buffers
Chapter 3. C# 3: LINQ and everything that comes with it
Automatically implemented properties
Implicitly typed local variables (var)
Object and collection initializers
Collection initializers
Anonymous types
The compiler-generated type
Lambda expressions
Capturing variables
Expression trees
Extension methods
Query expressions
The end result: LINQ
Chapter 4. C# 4: Improving interoperability
Dynamic typing
Introduction to dynamic typing
Dynamic behavior beyond reflection
A brief look behind the scenes
Limitations and surprises in dynamic typing
Usage suggestions
Optional parameters and named arguments
Impact on versioning
COM interoperability improvements
Generic variance
Restrictions on using variance
Chapter 5. Writing asynchronous code
Introducing asynchronous functions
First encounters of the asynchronous kind
Thinking about asynchrony
Synchronization contexts
Async method declarations
Await expressions
Wrapping of return values
Asynchronous method flow
The use of awaitable pattern members
Method completion
Asynchronous anonymous functions
Custom task types in C# 7
Async main methods in C# 7.1
Usage tips
Allow cancellation wherever possible
Chapter 6. Async implementation
Structure of the generated code
The stub method: Preparation and taking the first step
The MoveNext() method (high level)
A simple MoveNext() implementation
How control flow affects MoveNext()
Execution contexts and flow
Chapter 7. C# 5 bonus features
Capturing variables in foreach loops
Caller information attributes
Corner cases of caller information attributes
Using caller information attributes with old versions of .NET
Part 3. C# 6
Chapter 8. Super-sleek properties and expression-bodied members
A brief history of properties
Upgrades to automatically implemented properties
Expression-bodied members
Restrictions on expression-bodied members in C# 6
Chapter 9. Stringy features
A recap on string formatting in .NET
Localization
Introducing interpolated string literals
Localization using FormattableString
Other uses for FormattableString
Uses, guidelines, and limitations
Hard limitations of interpolated string literals
Accessing identifiers with nameof
Tricks and traps when using nameof
Chapter 10. A smörgåsbord of features for concise code
Using static directives
Object and collection initializer enhancements
Using extension methods in collection initializers
The null conditional operator
Indexers and the null conditional operator
Exception filters
Retrying operations
Part 4. C# 7 and beyond
Chapter 11. Composition using tuples
Introduction to tuples
Tuple literals and tuple types
Tuples as bags of variables
Tuple types and conversions
Conversions from tuple literals to tuple types
Conversions between tuple types
Tuples in the CLR
Regular equality and ordering comparisons
Alternatives to tuples
Uses and recommendations
Chapter 12. Deconstruction and pattern matching
Deconstruction of tuples
Deconstruction assignments to existing variables and properties
Deconstruction of nontuple types
Introduction to pattern matching
Patterns available in C# 7.0
Using patterns with the is operator
Using patterns with switch statements
Evaluation order of pattern-based switch statements
Thoughts on usage
Chapter 13. Improving efficiency with more pass by reference
Recap: What do you know about ref?
Ref locals and ref returns
Ref returns
in parameters (C# 7.2)
Overloading with in parameters
Declaring structs as readonly (C# 7.2)
Extension methods with ref or in parameters (C# 7.2)
Ref-like structs (C# 7.2)
Span and stackalloc
Chapter 14. Concise code in C# 7
Local methods
Local method implementations
Usage guidelines
Out variables
Improvements to numeric literals
Nontrailing named arguments (C# 7.2)
Minor improvements in C# 7.3
Chapter 15. C# 8 and beyond
Nullable reference types
Nullable reference types at compile time and execution time
Experiences of nullable reference type migration
Future improvements
Switch expressions
Recursive pattern matching
Indexes and ranges
More async integration
Features not yet in preview
Even more features in brief