Solving 'Object Reference Not Set' Error
“Object Reference Not Set to an instance of an object.” Cast the first stone for those who never struggled with this error message as a beginner C# / .NET programmer. This infamous and dreaded error message happens when you get a NullReferenceException. This exception throws when you attempt to access a member. For instance, a method or a property on a variable that currently holds a null reference. But what does null reference exactly mean? What exactly are references?