c# passing data between forms

|

C# project with two forms

public partial class Form1 : Form // this is the main form

public partial class Form2 : Form // this is the second form
To pass variables (values, data) from Form1 to Form2
Case: public variables in Form2
public string input_variable; // put this in Form2 as global variable

public string output_variable; // put this in Form2 as global variable
in Form1 inside the function that run (call) Form2