public static string strName;Form1:
function()
{
strName="OBC_INSTANCE";
call Form2.Sub();
}Form2:
Sub()
{
this.textbox.text=Form1.strName;
}
function()
{
strName="OBC_INSTANCE";
call Form2.Sub();
}Form2:
Sub()
{
this.textbox.text=Form1.strName;
}
private void button1_Click(object sender, EventArgs e)
{
using (Form2 form = new Form2())
{
form.Data = label1.Text;
form.ShowDialog();
}
}form2:
public string Data
{
get
{
return textBox1.Text;
}
set
{
textBox1.Text = value;
}
}