(Problem Solved) Control Inaccessible Due To Its Protection Level In C-Sharp – [How To Fix] (Visual Studio 2010 )
(Problem Solved) Control Inaccessible Due To Its Protection Level In C# – [How To Fix] (Visual Studio 2010 )
This Tutorial Shows How To Solve “Control Inaccessible Due To Its Protection Level” C# Error in Visual Studio 2010.
I get this error when trying to access Textbox from another form. So to fix this error
Step 1. Select The Item You Want To Make Accessible By Clicking On It.
Step 2. Right Click On It And Select Properties.
Step 3. Change Modifier Value From Private To Public.
Then You Can access it from another form as shown in the source code below:
ViewSelectedDatagridviewRow showNewFormOnButtonClick = new ViewSelectedDatagridviewRow(); showNewFormOnButtonClick.txtBoxFirstName.Text = "";