c# - How to share data between two Windows Form in Visual Studio 2008 -
m beginner n want help i have 2 forms form1 form2 form1 contains label, textbox, button. form2 contains textbox only. i want when click on button in form1 , text in textbox (form1 textbox) should pass form2 , show in textbox of form2 . code form1.cs public partial class form1 : form { public string str; public form1() { initializecomponent(); } public class global { public static string str; } private void form1_load(object sender, eventargs e) { } private void button1_click(object sender, eventargs e) { str = textbox1.text; } private void button2_click(object sender, eventargs e) { form2 f2 = new form2(); f2.show(); } } code form2.cs public partial class form2 : form { public form2() { initializecomponent(); } private void form2_load(object sender, eventargs e) { string str1 = form1.global.str; textbox...