Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the control inaccessible due to its protection level?

Tags:

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?

like image 368
user164203 Avatar asked Nov 16 '09 15:11

user164203


1 Answers

This is the default property for controls and can be solved by:

  1. Going into Design-View for the Form that contains the specified Control
  2. Then changing the Control's Modifiers property to Public or Internal.

Control Properties > Modifiers Screenshot

like image 86
jay_t55 Avatar answered Sep 20 '22 16:09

jay_t55