C# 7
summary
Walks through concrete C# 7 features with examples and tradeoffs: value tuples as mutable structs that avoid heap allocation for returning multiple values (min/max example), element names persisted in metadata, and a NodaTime extension showing deconstruct for year/month/day and constructor field assignment. Demonstrates pattern matching (type, constant, var) with switch/when guards and gotchas like int 5 vs 5L, local functions for clearer validation and efficient captured-state code, and valueTask for ASP.NET Core async optimization. Mentions throw as expression and readable numeric literals with underscores.
AI-written summary · about
chapters (15)
- 0:00Start
- 3:45Tuples
- 10:23Value Types
- 13:23Anonymous Types
- 17:02Element Names
- 19:09Deconstruction
- 32:39Pattern Matching
- 33:09Three Patterns in C-Sharp Seven
- 36:01Use of Unassigned Local Variable
- 50:03Var
- 52:40Local Functions
- 52:56Fibonacci Sequence
- 56:50Local Methods
- 58:25Custom Async Return Types
- 1:00:41Nested Conditional Operator
related talks
56mChange your habits: Modern techniques for modern C#
01h 00mC# 8 and Beyond
55mLet’s catch up with C#! Exciting new features in C# 9, 10, 11 and 12!
01h 14mThe Top 10 Best New Features in C# Version 6 to 9
46mC# Goes to 11
01h 08mThinking Functionally with C#
01h 00mWhat's new in C#? - Exciting new features in C# 9, 10 and 11!
59mWhat's new in C#? Exciting new features in C# 9, 10 and 11!
