Pro tip: until nullable reference types hit primetime, use JetBrains.Annotations and add NotNull / CanBeNull attributes to all reference-type fields, properties, parameters and return types. As long as you run ReSharper and fix all warnings, you should never have a NullReferenceException again.
Even better - install ReCommended extensions for ReSharper, and make it a warning to not annotate reference types. Your code should now be almost NullReferenceException-proof.
Enjoy never worrying about this error again.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Pro tip: until nullable reference types hit primetime, use JetBrains.Annotations and add NotNull / CanBeNull attributes to all reference-type fields, properties, parameters and return types. As long as you run ReSharper and fix all warnings, you should never have a NullReferenceException again.
Even better - install ReCommended extensions for ReSharper, and make it a warning to not annotate reference types. Your code should now be almost NullReferenceException-proof.
Enjoy never worrying about this error again.