c# - What access specifier must be used for UserControl members when used with the WinForms Designer? -
i created larger usercontrol , added forms designer form.
the application compiles , runs fine, until edit in designer.
then in initializecomponent the
this.myusercontrol = new myusercontrol();
line vanishes. user control gets declared , initialized. problem is, instance creation missing , when comes initialization nullreferenceexception.
i have add didn't touch designer few weeks. during time changed lot of public fields of usercontrol internal or private. worked fine until tried edit form contains usercontrol.
when found missing instantiation took backup , changed every membervariable of usercontrol public , problem missing instantiation fixed again.
are there known problems/restrictions according access specifiers used in windows forms usercontrols when used in designer?
Comments
Post a Comment