NullReferenceException on line that does nothing.

  • Thread starter Thread starter Tom DAurizio
  • Start date Start date
T

Tom DAurizio

Hi,
I've got a strange NullReferenceException on this line:

System.Data.DataTable oDT = null;

I've tried not initializing it, and setting it to something on the
next line, but that doesn't change anything.

Strangely, it does not throw an exception when I'm running in debug
mode (debugging on the device, not the emulator). It does throw when
I deploy and run on that same device.

Has anyone seen this behavior?

Thanks, and have a good day.
Tom
 
Sounds like the assembly on the device isn't actually the assembly it's
getting debug info from. Make sure you have no "stray" copies anywhere on
your development machine. This is common when you're doing controls that
have to be in one place for designer support and another for development.
 
My guess would be that what you run in the debug mode and what you deploy
and run are not the same things
 
Back
Top