4
Answers

Null reference error again and again...

Ask a question
Sam

Sam

12y
5.2k
1
Null reference errors are something I encounter every now and then, and normally I can detect my error and fix it.
I encounter today one that looks too simple to belive I can't fix it, but obviously I do something wrong.
Instead of wasting hours (as I already did), I ask for help.
Please look at the attached stripped-off source and help if you can.

I have a main class with a public TextBox mainDisplay,
I reference a second class.
In the second class I have a text box that referes to the mainDisplay textbox of the main class. 

I am unable to display data from the second class, and I always get the text box as Null, which causes error.
See attached.
thanks

samtal

Attachment: frmmain.rar

Answers (4)