Exception before event handler is triggered

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Why do I get the exception


An unhandled exception of type 'System.NullReferenceException' occurred in
system.dll

Additional information: Object reference not set to an instance of an object.


before even getting to the first line of the event handler for my radio
button? I guess that all objects which are used in the call to the event
method is instantiated by VS. What could be wrong?
 
Joachim,

Without seeing the code, it is nearly impossible to tell. However, the
error is well-defined.

When you debug your code, what happens?
 
Hmm... I had set one of the radio button's Checked property to true, and
when I set it back to false everything worked. But what about if I want one
of the radio buttons to be checked initially then?
 
Hi,

why don't you post some code,

also are you compiling in debug mode? that error seems pretty tense to be a
debug time error.

cheers,
 
Back
Top