Join 2.9 million developers at
Join 2.9 million developers at
LEARNING OBJECTIVES
- An understanding of NullReferenceException and when it can be thrown
- A working knowledge of C# nullable operators to simplify null checks
- The ability to identify problematic code blocks using C# nullable references
- Familiarity with the Option wrapper to avoid NullReferenceException
- The ability to avoid NullReferenceException when working with some LINQ methods
Learning Roadmap
1.
Strategies to Get Rid of NullReferenceException
Strategies to Get Rid of NullReferenceException
About This CourseWhat Is the NullReferenceException?Exercise: NullReferenceException and CollectionsQuiz on NullReferenceExceptionChecking and Preventing NullExercise: Refactoring a Function to Prevent NullC# 6.0-8.0 Nullable OperatorsQuiz on Nullable OperatorsC# 8.0 Nullable ReferencesExercise: Fixing Compilation Errors with Nullable ReferencesUse the Option WrapperExercise: Practicing Utility Methods from the Optional LibraryImplement Your Option WrapperLINQ XOrDefault MethodsExercise: LINQ XOrDefault MethodsSeparate Objects and Separate StateExercise: Solve a Real NullReferenceException IssueWrap Up!
Certificate of Completion
Showcase your accomplishment by sharing your certificate of completion.
Complete more lessons to unlock your certificate
Developed by MAANG Engineers
ABOUT THIS COURSE
NullReferenceException is an error that programmers frequently encounter, and it is often referred to as the Billion Dollar Mistake. This course is designed to assist you in avoiding this error.
You will begin by gaining an understanding of when NullReferenceException is thrown and how to prevent null in your code. You’ll also learn how to employ nullable operators to simplify null checks and use nullable references and the Option wrapper to identify problematic code blocks. Finally, you will explore avoiding NullReferenceException when using specific LINQ methods and designing your C# classes.
Upon completing this course, you’ll have gained the necessary knowledge and skills to effectively address and avoid NullReferenceException issues in your projects.
ABOUT THE AUTHOR
Cesar Aguirre
Software Engineer | Lifelong learner | Language enthusiast | Avid reader
Trusted by 2.9 million developers working at companies
A
Anthony Walker
@_webarchitect_
E
Evan Dunbar
ML Engineer
S
Software Developer
Carlos Matias La Borde
S
Souvik Kundu
Front-end Developer
V
Vinay Krishnaiah
Software Developer
Built for 10x Developers
No Passive Learning
Learn by building with project-based lessons and in-browser code editor


Personalized Roadmaps
The platform adapts to your strengths & skills gaps as you go


Future-proof Your Career
Get hands-on with in-demand skills


AI Code Mentor
Write better code with AI feedback, smart debugging, and "Ask AI"




MAANG+ Interview Prep
AI Mock Interviews simulate every technical loop at top companies


Free Resources