Hello all,
I've got a strange problem with a NullReferenceException, and I've been searching for the item that hasn't been set and I just can't seem to find it. (No source code available at location). Oh and the times I get the NullReferenceException appear to be random or I don't get them all the time.
I'm working on a control. My solution has just the test project and the control project in it. The only thing the test project does is show my control, a listbox, and a button and there is not code (save for what the From designer put in there).
I've been commenting out various bits of my control and can't seem to find which subroutine has the offending code. So I put all the code in all the subroutines I don't have commented out in Try...Catch blocks hoping to catch where it was throwing it, but that didn't work either.
Does anyone know how to hunt for a NullReferenceException that is defeating all those debug methods?
I've got a strange problem with a NullReferenceException, and I've been searching for the item that hasn't been set and I just can't seem to find it. (No source code available at location). Oh and the times I get the NullReferenceException appear to be random or I don't get them all the time.
I'm working on a control. My solution has just the test project and the control project in it. The only thing the test project does is show my control, a listbox, and a button and there is not code (save for what the From designer put in there).
I've been commenting out various bits of my control and can't seem to find which subroutine has the offending code. So I put all the code in all the subroutines I don't have commented out in Try...Catch blocks hoping to catch where it was throwing it, but that didn't work either.
Does anyone know how to hunt for a NullReferenceException that is defeating all those debug methods?