Conversions from tuple literals to tuple types
Course Content
0 / 138 completedPart 1. C# in context
An evolving language
Balancing efficiency and complexity
Ever more concise code
An evolving platform
Part 2. C# 2–5
An evolving book
Generics save the day
Generics
Type constraints
What can be generic
The default and typeof operators
Nullable value types
Language support Part 1
CLR and framework support - The Nullable T struct
Language support Part 2
The importance of being lazy
Iterators
Simplified delegate creation
Minor features
Implementation sketch
Fixed-size buffers
Namespace aliases
Automatically implemented properties
Object and collection initializers
Implicitly typed local variables (var)
Collection initializers
The compiler-generated type
Anonymous types
Lambda expressions
Capturing variables
Expression trees
Extension methods
The end result - LINQ
Query expressions
Dynamic typing
A brief look behind the scenes
Introduction to dynamic typing
Limitations and surprises in dynamic typing
Usage suggestions
Optional parameters and named arguments
Impact on versioning
Dynamic behavior beyond reflection
COM interoperability improvements
Generic variance
Introducing asynchronous functions
Restrictions on using variance
First encounters of the asynchronous kind
Thinking about asynchrony
Async method declarations
Synchronization contexts
Wrapping of return values
Await expressions
The use of awaitable pattern members
Asynchronous anonymous functions
Asynchronous method flow
Method completion
Async main methods in C# 7.1
Allow cancellation wherever possible
Usage tips
Custom task types in C# 7
Structure of the generated code
The MoveNext() method (high level)
The stub method - Preparation and taking the first step
A simple MoveNext() implementation
Capturing variables in foreach loops
How control flow affects MoveNext()
Caller information attributes
Execution contexts and flow
Using caller information attributes with old versions of .NET
Corner cases of caller information attributes
Part 3. C# 6
A brief history of properties
Upgrades to automatically implemented properties
Expression-bodied members
Restrictions on expression-bodied members in C# 6
A recap on string formatting in .NET
Localization
Introducing interpolated string literals
Other uses for FormattableString
Uses, guidelines, and limitations
Localization using FormattableString
Hard limitations of interpolated string literals
Accessing identifiers with nameof
Tricks and traps when using nameof
Object and collection initializer enhancements
Using static directives
Using extension methods in collection initializers
Indexers and the null conditional operator
Exception filters
Part 4. C# 7 and beyond
The null conditional operator
Introduction to tuples
Retrying operations
Tuple types and conversions
Tuple literals and tuple types
Tuples as bags of variables
Conversions from tuple literals to tuple types
Tuples in the CLR
Regular equality and ordering comparisons
Conversions between tuple types
Alternatives to tuples
Uses and recommendations
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
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 T and stackalloc
Local methods
Local method implementations
Usage guidelines
Out variables
Improvements to numeric literals
Minor improvements in C# 7.3
Nontrailing named arguments (C# 7.2)
Nullable reference types
Nullable reference types at compile time and execution time
Future improvements
Experiences of nullable reference type migration
Switch expressions
Recursive pattern matching
Indexes and ranges
More async integration
Features not yet in preview
Even more features in brief