I'm trying to access a control's text property from program.cs and it says that it is inaccessible due to protected level. How can I fix this please?
+4
A:
This is the default property for controls, and can be solved by going into Design-View for the Form that contains the specified Control, then changing the Control's Modifiers property to Public or Internal. That oughta do it! :)
baeltazor
2009-11-16 15:31:08
Note: just to emphasize as this seems to have been very unclear by the asker, this is the *control's instance itself* that's protected (i.e., the variable holding the control), not the *`.Text` property*, which is public.
Abel
2009-11-16 17:35:48
thank you Abel .
baeltazor
2009-11-16 18:12:23