.NET Tools Livestreams

How to stop worrying and adopt nullable reference types – Webinar Recording

The recording of our July 9 webinar, How to stop worrying and adopt nullable reference types, with Andrey Dyatlov, is now available. Subscribe to our community newsletter to receive notifications about future webinars.

Nullable reference types is a deceptively simple feature. While starting with it is as easy as adding a single ? mark to your source code, migrating large code bases has been proven to be a tedious and sometimes quite tricky task especially when complex code contracts and generics are involved.

The presentation will quickly cover what benefits this feature brings to the table, how it differs from JetBrans.Annotations attributes and how it evolved since its original release almost a year ago.

I will show a couple of ways to ease migration of large code bases to nullable reference types and how you can start to benefit from the feature immediately without putting any effort into annotating your code base just yet. I will also outline the most common pitfalls and explain how to deal with generics and potential analysis shortcomings as well as how to guide the compiler through complex code contracts to get the most out of this feature.

Webinar agenda:

  • 0:00 Introduction
  • 0:30 What are nullable reference types?
  • 6:02 Demo of nullable reference types
  • 10:10 Annotate everything
  • 12:20 Benefit now, annotate later (use nullable warnings)
  • 18:35 Annotate as you write code
  • 19:55 What about unannotated API usages?
  • 23:46 Null safety (generics, complex contracts, incorrect analysis)
  • 29:29 How to make nullability warnings go away?
  • 37:04 Summary of nullable reference types
  • 37:37 Common pitfalls
  • 46:24 C# 9 and .NET 5 additions
  • 50:10 Warnings as Errors
  • 55:40 Conclusion and questions

Download ReSharper and give it a try!

About the presenter:

Andrey Dyatlov is a Software Engineer at JetBrains working on C# language support in ReSharper/Rider from parser implementation to static analysis and refactorings. Started his career from industrial programming for vacuum coating and plasma etching equipment using SCADA-systems. Prior to joining JetBrains, he got a wide range of experience while working in financial and industrial sectors. Interested in program analysis, type theory and metaprogramming.

Follow Andrey on Twitter.

image description

Discover more