null object cannot be converted to a value type
Posted on 2008-11-14
I am writing a windows application using C#.
I have a form, which calls another form with this code:
using (NewForm nf = new NewForm())
//My Post Dialog Code
//This is point ONE
//This is point TWO
Between point ONE and point TWO, I get a MessageBox saying "null object cannot be converted to a value type." without any additional information. There is an OK button and the Close Box.
- I catch exceptions in both forms
- It is obvious that there is something at the disposal of NewForm
- I get this message also with another form, but many others run without error
Thanks in advance