What is NullReferenceException in C#?

added by DotNetKicks
9/20/2022 4:07:35 PM

171 Views

In C#, a NullReferenceException occurs when we try to access a variable whose value has not been set or has been set to null. It can be easy to trigger this exception accidentally, so it's important to be aware of how to avoid it in the first place.


0 comments