Enable warnings about possible null references in your Visual Studio project
All .NET programmers had dealt at least once on their career with a null reference exception on a code line they wrote. Most of the times a parameter of a method is null, the code is not aware of it and the parameter is being used inside the method, for example we are accessing a property of an object. Because the value of the object is null we are getting an exception on the runtime.
Visual Studio provides a way to inform / warn us about possible null references. Let us see how we can enable this feature on our C# project.Read the complete article