Possible Duplicate:
Cloning objects in C#
My code :
private void button1_Click(object sender, EventArgs e)
{
CopyForm(new Form1());
}
public void CopyForm(Form form)
{
Form frm = form;
frm.Text = "1";
form.Text = "2";
string c = frm.Text;// out 2
string c2 = form.Text;// out 2
}
How to create object from Form without Ref
?
Please show me the best way.
Edit :
please sample.