'inaccessible due to its protection level'

L

Larry

Thanks in advanced for your help

I've added a TextBox1 and Button1 to a form in C# in VS.net 2003.

When I double click on the Button1 at design time, a private method
ButtonClick.

I've defined a local variable inside the ButtonClick event named 'string
strSample;'

{
string strSample;
strSample = TextBox1.text;


}

after I hit F5 to go into debug mode, I get the error 'inaccessible due
to its protection level'

and 'TextBox1.text' is highlighted - using VisualStudio.net 2003.


Any advice?

thanks for all of your help
 
P

Patrick

textBox1.Text

When you enter text, and you enter a dot, you should get
on-screen suggestions for alternatives to follow. If that
doesn't happen there is something wrong.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top