P
profnachos
When I step through code and come to the line in the try block
try
{
chkJobCompleted.Checked = dispatchJob.JobCompleted;
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
I get a pop up message consistently that says "Object reference not set
to an instance of an object"
Several observations to note:
* the checkbox (chkJobCompleted) is NOT null
* the object dispatchJob is NOT null.
* why doesn't the try block catch it? Why doesn't it go into the catch
block? Why do I get a popup message despite the try block?
* after I click okay on the popup message box, the code goes on.
It does not make sense to me. Thanks for all your help.
try
{
chkJobCompleted.Checked = dispatchJob.JobCompleted;
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
I get a pop up message consistently that says "Object reference not set
to an instance of an object"
Several observations to note:
* the checkbox (chkJobCompleted) is NOT null
* the object dispatchJob is NOT null.
* why doesn't the try block catch it? Why doesn't it go into the catch
block? Why do I get a popup message despite the try block?
* after I click okay on the popup message box, the code goes on.
It does not make sense to me. Thanks for all your help.