4
Answers

c# - winform - passing variables between forms

Memento

Memento

12y
2.7k
1
c# - winforms
On Form1 I have a Button and a Label (Label1)
ButtonClick:
Form2 Form2 = new Form2();
Form2.ShowDialog();
On Form2 I have a dgv
Form2.ClosingEvent:
string abc = Form2.dgv.CurrentCell.Value.ToString();
Form1.Label1.Text = abc;
How could I do this?
Answers (4)