Whenever a NullReferenceException is thrown in production code, it is always a bug, and yet, with reference types, some default to null and "fall in" to doing the wrong thing (dereferencing them without checking for null). Furthermore, there is no reasonable syntax for indicating that null is not a valid value for a reference type. It is idiosyncrasies like this that C# 8.0 is targeting to fix—and doing so in a way that avoids any breaking changes—at least by default. The features in C# 8.0, however, don't stop with nullable reference types. They also include an improved version of Reactive Extensions with a language features called async streams, default interface implementations (forcing a corresponding .NET upgrade as well), and more extension member types (constructors and events for example). This session will dive into the language features of C# 8.0 understanding what new capabilities it introduces and the effect that said features might have on your C# coding standards. Don't miss this session to learn how to write C# 7.0 in a way that is easily upgradable to C# 8.0.
You will learn:
- All about C# 8.0
- How to hunt for nulls where they aren't expected
- How to compose asynchronous and event-based programs with C# syntax