C# property in a form class only accessable after formload event
- by Spooky2010
using vs2008, c#
Howdy,
Im instantiating and calling Form B from Form A. FormB has some custom properties, to allow me to pass it things like sqlAdaptors and dataset instances.
When i instantiate and show Form B from Form A as a dialog form with a Using statement, it all works fine, but i find the properties i pass are not available in Form B until after the form_load event has fired.
I was under the impression the properties when passed to a instantiated class should be available from a constructor, but this is not the case. If it try to access the properties before the form load event i get a null reference exception.
Is this correct behavior ?
It is very annoying.
thanks for any help