© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
V. SarcarSimple and Efficient Programming with C# https://doi.org/10.1007/978-1-4842-8737-8_11

11. Special Attention to the Null Values

Vaskaran Sarcar1  
(1)
Kolkata, West Bengal, India
 
In the previous chapter, I told you about runtime exceptions. These are dangerous. Most often, they come in the form of the NullReferenceException in C#. Similarly, Java has the NullPointerException. The exception names can be different, but at the core, they arise when you try to access a member of an object whose value is null. Michael Feathers wrote the following in the book Clean Code:

Returning null from methods is bad, but passing null into methods is worse. Unless you ...

Get Simple and Efficient Programming with C#: Skills to Build Applications with Visual Studio and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.