dotnet · dotnet/NullReferenceException
NullReferenceException
NullReferenceException
Thrown when code attempts to dereference a null object reference. The most common exception in C# — check that the object was initialized and is not null before accessing its members. Use the null-conditional operator (?.) or null checks to guard access.