Inheritance question

  • Thread starter Thread starter Adrian
  • Start date Start date
A

Adrian

Why does text box 1 not show "Hello"?
Thank you,
Adrian

In MainForm:

if (......) new Trial(1);

internal string tb1
{
get { return this.textBox1.Text; }
set { this.textBox1.Text = value; }
}


Trial:

public partial class Trial : MainForm
{
int arg;
public Trial(int arg )
{
this.arg = arg;
InitializeComponent();
if (arg == 1) base.tb1 = "Hello";
}
}
 

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

Similar Threads

Help with SendInput 2
Is it based up polymorphy or just inheritance? 2
same assembly size for debug and release 2
interface 1
Java to C#. Please help. 3
inheritance problem 2
Use of event handling 6
? 7

Back
Top