Unexpected null values and NullReferenceExceptions can be a constant source of bugs resulting in wasted time and out of hours support callouts. In this course, Working with Nulls in C#, you'll learn about the different ways that null values pop up in C# code and how to deal with them. First, you'll dive into the fundamentals of why you get null values and the difference between value and reference types. Next, you'll explore how you can use the various C# operators to check for and manipulate nulls. Then, you'll see how to think about nulls at a higher abstraction level in your object-oriented code. Finally, you'll discover how the features introduced in C# 8 can help even more by allowed non-nullable reference types. By the end of this course, you'll understand the different types of objects in C#, how to correctly create nullable value types, how to use C# operators to work with nulls in fewer lines of code, how to implement the Null Object pattern, and how to use nulls in C# 8.
Course Overview (Music) Hi everyone! My name is Jason Roberts, and welcome to my course, Working with Nulls in C#. I'm a freelance developer and author. The creator of nulls has called them his billion-dollar mistake, and if you've ever been phoned at 2 a.m. in the morning due to a production outage because of nulls, you'll probably agree with this statement. Nulls can cause a lot of problems, but they can also be a useful construct in your applications. In this course, you'll learn the many different ways to work with null values in C#. Some of the major topics that we'll cover in this course include the difference between value and reference types, how to create nullable value types such as null date/times, how to access and check for null values, how to eliminate null reference exceptions with a specific design pattern, and how to leverage the new features of C# 8 when working with nulls. By the end of this course, you'll know how to create and use null values and how to help prevent null reference exceptions in production. Before beginning the course you should be familiar with basic C# programming. I hope you'll join me on this journey to learn how to manage null values with the Working with Nulls in C# course at Pluralsight.