In my form1 I have a variable
public string parent;
and in my form2 I have the code to set that variable's value
Form1 bfm = new Form1();
bfm.ShowDialog(this);
bfm.parent = "EditItem";
but when I used the variable parent it gives me a null reference exception
What could be the problem here? Can anyone help me? Thank you in advance. I am just a beginner.