Sunday, June 30, 2013

Visual Studio throws an exception: "Object reference not set to an instance of an object."

This is not an excedption from Visual Studio. This exception comeds straight from your Programm Code.


As it comes from your code, the Debuger should highlight/show you teh exact line where it happens. We need to know that line.


We also need to know the full Stacktrace of the Exception (should be in the same DialogBox as the exception itself).


Generally you get this exception when you try to access a Field/property/Function of an Object Reference that has not yet been created (there was no new or assigment targetting that Reference, or you set it to null since).




Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2


No comments:

Post a Comment