110,536
社区成员
发帖
与我相关
我的任务
分享
public delegate void Callback(string str);
public Class Form1()
{
public event Callback Callevent=null;
private void button1_Click(object sender, EventArgs e)
{
Callevent(textBox1.Text);
}
}
public Class Form2()
{ private void button1_Click(object sender, EventArgs e)
{
Form1 child = new Form1();
chil.Callevent += (send) =>
{
textBox1.Text = send;
}; child.Show();
}
}