Object reference not set to an instance of an object?

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
you trying to use object that wasn't intialised with new property
In other words you are trying to execute methods or work with values of null object

This example will produce exactly the same erro
string test = null
test.ToUpper()
In this example you can see that you are trying to call method of object which is null
 
I get the error too, when I add a context menu to any class in design mode,
then right-click the icon and click "Edit menu". It works okay if the class
being desiged is a form, but not if it is a treeview (which makes it pretty
useless).

Regards,
Aaron Queenan.
 
you trying to use object that wasn't intialised with new property
In other words you are trying to execute methods or work with values of null object

This example will produce exactly the same erro
string test = null
test.ToUpper()
In this example you can see that you are trying to call method of object which is nul
 
Back
Top