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";
}
}
 
Back
Top