Mobile 5.0 version differences ..

  • Thread starter Thread starter princepanchal
  • Start date Start date
P

princepanchal

I have some CF 2.0 code that I'm testing on the following Mobile 5.0
builds

1) OS 5.1.342 (Build 15096.3.0.0)
2) OS 5.1.478 (Build 15706.3.5.2)

Is 2) just a more current version of 1)?

Also for this code in the OS 5.1.478 version I am getting a
NullReferenceException.

Form myForm = new Form ();
myForm.ShowDialog();
myForm.Dispose(); // NullReferenceException thrown here

Why am I getting this exception in the newer version. Thanks

I am using CF 2.0.7045.0

Thanks!
 
I have a try catch block around this code.

Form myForm = new Form ();
myForm.ShowDialog();
myForm.Dispose(); // NullReferenceException thrown here

We are conisdering using the "

Form myForm = new Form ();
Using (form) {
myForm.ShowDialog();
}

If we have a try catch block around this code we get the same
exception. No try catch block
and the code works fine.

At this point it looks like we need to use the using ... ?
 
You have something weird going on in your Form - maybe something in a
Closing handler, a finalizer or a Dispose call. Forms shown with ShowDialog
inplicitly stay "alive" after close because it's assumed you might use it
again. All 'using' does is wrap it with a try/finally, so there's no magic
going on there that you can hand write.
 
Back
Top