You will get this error when you try an access an object that has not been instatiated.
For e.g. I have a class
Employee
which has a
Name
attribute.
Employee obj;
MessageBox.Show(obj.Name.ToString());
What you should be doing is instantiating your object using the
new
keyword.