About This Course
Get introduced to the course and its prerequisites.
We'll cover the following
Overview
Let’s assume we are familiar with the following exception message:
"Object reference not set to an instance of an object"
That’s the NullReferenceException
. This minicourse will teach us principles and techniques to avoid this exception.
We will learn when NullReferenceException
is thrown, how to use nullable operators and references, and how to use the Option
type to avoid this exception. Also, we will learn how to avoid NullReferenceException
when working with some LINQ methods.
Prerequisites
This is not an introductory course on C#. Prior to taking this course, you should be comfortable declaring and initializing objects and working with conditionals, loops, and collections, such as arrays and lists.
All examples are run using .NET 6. If we want to apply these lessons to our everyday coding, we should install a recent version of an integrated development environment (IDE) for C#, such as Visual Studio.
Even though we’re using modern C# features from .NET 6, some techniques will still work with the classic .NET Framework.
Without any further ado, let’s get started!