I have the following code (this is an excerpt which I tried to include all the important info in it)
public partial class MyTopScreen : Form
{
public bool _myVariable ;
public CommonForm _commonGridForm;
public MyTopScreen(bool first_param, string second_param )
{
CommonForm commonGridForm = new CommonForm();
DataGridView dataGridView1 = commonGridForm.dataGridView1;
_commonAttributForm = commonAttributForm;
InitializeComponent();
this.TabPage1.Controls.Add(dataGridView1);
}
}
and then when I am inside CommonForm
which is as follows:
public partial class CommonForm : Form
{
public CommonForm()
{
//My Question is how do I access the _myVariable from this point in the code ?
//this.parent doesnot work or does not give me access to _myVaribale
}
}
Thanks in advance for your much appreciated help.