Chapter 3. Advanced Concepts of C# and .NET
We've seen how the C# language evolved in early versions, 2.0 and 3.0, with important features, such as generics, lambda expressions, the LINQ syntax, and so on.
Starting with version 4.0, some common and useful practices were eased into the language (and framework libraries), especially everything related to synchronicity, execution threads, parallelism, and dynamic programming. Finally, although versions 6.0 and 7.0 don't include game-changing improvements, we can find many new aspects intended to simplify the way we write code.
In this chapter, we will cover the following topics:
- New features in C# 4: covariance and contravariance, tuples, lazy initialization, Dynamic programming, the
Task
object and asynchronous calls. - The async/await structure (belongs to C# 5).
- What's new in C# 6.0: string interpolation, Exception filters, the
NameOf
operator, null-conditional operator, auto-property initializers, static using, expression...