So I have 2 forms and need to pass a property from one form to the other.
On Form 1 I have a method
private void rb_CheckedChanged(object sender, EventArgs e)
{
var frm2= new Form2();
WorkComplete += frmSetNewTime.btnOk_Click;
frmSetNewTime.Show();
}
private void WorkComplete(object sender, EventArgs e)
{
// Property = Property from form 2
}
On Form2 I have a method called btnOK_Click
public void btnOk_Click(object sender, EventArgs e)
{
Property = 5
}
My goal is to pass the property from form2 back to form 1.
I cant subscribe WorkComplete because it is a method group is the error I get. Does anyone know the proper way, or maybe proper syntax, to do this?