public void abc(string x) { dataGridView1.Rows.Add(x); } private void button1_Click(object sender, EventArgs e) { Form2 f = new Form2(); f.Show(); }
public delegate void func(string x); ......... private void button1_Click(object sender, EventArgs e) { func f = null; Form1 frm = new Form1(); f = frm.abc; f("def"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)