The Error
Build warning:
CS8602: Dereference of a possibly null referenceQuick Fix - 1 Min
1. Check null: if (user!= null) user.Name. 2. Null-forgiving: user!.Name if you're sure. 3. Make property non-nullable or initialize. 4. Disable: #pragma warning disable CS8602
Root Cause
Nullable reference types enabled. Compiler sees possible null.
No comments yet. Be the first to share your thoughts!