Noob help---Protection error

GenDeathRaiser

Newcomer
Joined
May 15, 2005
Messages
17
Location
Brick, NJ
Well first I'm very new to any programming language but I really want to get into it. I'm just making programs right now that are basically like you click a button and it moves data from here to there, so in this case I have three text areas and a button.

textBox1
textBox2
textBox3
button1

When button1 is clicked it takes textBox1.text and textBox2.text and adds them together with + and is supposed to put it in textBox3.text. So basically I have this

textBox3.text = textBox1.text + textBox2.text;

I don't know if this is right at all, but I keep getting this error

[C# Error] WinForm.cs(125): 'System.Windows.Forms.Control.text' is inaccessible due to its protection level

I don't know where, or how to change the protection level. I'm using Borland Delphi 2005. Any help would be appreciated.
 
Are you using .text or .Text? Since C# is case-sensitive, if the TexbBox class has a private member named text you will get this error. Change ".text" to ".Text" and you should be alright.
 
Back
Top