~/talk

Change your habits: Modern techniques for modern C#

Talkat NDC London 2020 · 2020-01-27..01-31· [c-sharp, dotnet]
slides:none on file

Demonstrates concrete C# practices: using tuple assignments for swaps and concise equality/constructors, declaring read-only structs and read-only members to let the compiler enforce immutability, and enabling nullable reference types plus the ?? throw discard pattern to replace verbose null checks. Builds a toll-calculator with a pattern-matching switch that shrinks a 50-line if/else into six concise rows, and shows DateTime.AddYears to avoid a leap-year bug — all working code-level fixes and refactorings.

AI-written summary · about

  1. 0:00Introduction
  2. 5:00Point class
  3. 6:40tuples
  4. 8:10tuple assignment
  5. 12:28tuple tricks
  6. 13:15readonly struct
  7. 17:14readonly properties
  8. 19:41enforce your design
  9. 20:40knowable reference types
  10. 22:45nullable reference
  11. 26:28throw expression
  12. 27:38argument null exception
  13. 34:38pattern matching
  14. 36:15switch expression
  15. 37:38range patterns
  16. 38:28imperative method
  17. 39:35business requirements
  18. 40:01using pattern matching
  19. 40:41building the table
  20. 43:48discards
  21. 45:26how clear is that
  22. 46:05quiz
  23. 46:38generate subscription
  24. 47:27datetime
  25. 52:13do some research
  26. 53:58MS New CSharp
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.