NullReferenceException
-
Hi all, I am working in a mobile device application. Things are going well.. but suddenly a NullReferenceException is occurring at various event handlers.. Is there any body who can solve the problem... sandesh khare.. :((
sandesh
-
Hi all, I am working in a mobile device application. Things are going well.. but suddenly a NullReferenceException is occurring at various event handlers.. Is there any body who can solve the problem... sandesh khare.. :((
sandesh
A
NullReferenceException
always occurs because you've tried to dereference a null reference. For example, if you try to manipulate anull
string. The debugger will show you where the problem occurred. Then check all the variables used by that line of code. When you find the one that's null, that's where your problem is.DoEvents: Generating unexpected recursion since 1991
-
Hi all, I am working in a mobile device application. Things are going well.. but suddenly a NullReferenceException is occurring at various event handlers.. Is there any body who can solve the problem... sandesh khare.. :((
sandesh
Check all objects that your passing to the event, where you got the NullReferenceException . :)
Windows mobile development, pocket pc development , C#.net compact framework, Desktop application , web service
-
A
NullReferenceException
always occurs because you've tried to dereference a null reference. For example, if you try to manipulate anull
string. The debugger will show you where the problem occurred. Then check all the variables used by that line of code. When you find the one that's null, that's where your problem is.DoEvents: Generating unexpected recursion since 1991
hi Mike.. I don't think that is the problem.. When I am in debug mode no problem occurs...when i am running with F5 then a message box appears with 'NullReferenceException'...So I am unable to get the exact line number of problem. sandesh khare :((
sandesh
-
hi Mike.. I don't think that is the problem.. When I am in debug mode no problem occurs...when i am running with F5 then a message box appears with 'NullReferenceException'...So I am unable to get the exact line number of problem. sandesh khare :((
sandesh
Seems like one of the variables being used in the event handler does not have any value assigned to it. The reason it's not occurring in debug mode is that it gets the required time to get the value and therefore no exception is thrown. You can also check for the variables and their values at the time when the exception occurs which can give you a hint for the cause of the exception. ~Dave
Dave Traister Software Engineer ComponentOne LLC www.ComponentOne.com