Bringing C# nullability into existing code - dammit is not the answer!
summary
Nullable reference types give compile‑time flow analysis, not runtime safety, and migrating an old C# codebase needs design changes not just sprinkled `?` and `!`. Start with central DTOs, use Visual Studio value tracking and ReSharper’s migrate to nullable autofixes, convert JetBrains annotations if present, and prefer attributes like AllowNull/MaybeNull/NotNullWhen or the new required keyword. Beware: enabling nullability can alter EF Core migrations and database schemas.
AI-written summary · about
chapters (8)
- 0:00Nullable reference types intro
- 7:37How nullable refs work
- 13:40Internals of nullable refs
- 23:38Annotating code with attributes
- 37:01Nullable refs in generics
- 40:56Third-party libraries handling
- 43:02Migrating existing code
- 57:24Summary and best practices
related talks
59mMuch Ado about Nothing: A C# play in two acts - Act 1
01h 03mWhere is C# headed?
01h 05mMuch Ado about Nothing: A C# play in two acts. Act 2
55mWhat's New in C# 8
57mWhat's Coming to C#?
01h 00mWhat's new in C#? Exciting new features in C# 8.0, 9.0 and 10!
01h 06mC# 8: Be Good, Get Good or Give Up
56mChange your habits: Modern techniques for modern C#
