Working with Nulls in C#

Learn how to create, check for, access, and eliminate nulls in your C# applications.
Course info
Rating
(113)
Level
Intermediate
Updated
September 8, 2016
Duration
1h 25m
Table of contents
Description
Course info
Rating
(113)
Level
Intermediate
Updated
September 8, 2016
Duration
1h 25m
Description

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're going to learn about the different ways that null values pop up in C# code and how to deal with them. First, you're going to learn the fundamentals of why you get null values and the difference between value and reference types. Next you'll learn how you can use the various C# operators to check for and manipulate nulls. Finally, you'll learn how to think about nulls at a higher abstraction level in your object-oriented code. 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 with fewer lines of code, and how to implement the Null Object pattern to remove the need to write repetitive null checking code.

About the author
About the author

With over 15 years experience, Jason Roberts is a Microsoft .NET MVP, freelance developer, and author.

More from the author
Azure Function Triggers Quick Start
Intermediate
1h 44m
4 Mar 2017
Working with Data and Schemas in Marten
Intermediate
1h 55m
7 Dec 2016
More courses by Jason Roberts
Transcript
Transcript

Hi everyone, my name's Jason Roberts, welcome to my course, Working with Nulls in C#. I'm a Microsoft .NET MVP, freelance developer and author. In this course, we're going to learn about the different ways that null values pop up in C# code and how to deal with them. Some of the major topics that we'll cover in this course include the fundamentals of why we get null values and the difference between value and reference types, how we can use the various C# operators to check for and manipulate nulls, and how to think about nulls at a higher abstraction level in our object oriented code. 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 with fewer lines of code, and how to implement the Null Object pattern to remove the need to write repetitive null checking code. Before beginning the course you should be familiar writing basic C# code in Visual Studio. I hope you'll join me on this journey with the Working with Nulls in C# course, at Pluralsight.