title: Passing data between form1.cs and program.cs
body: <p>I know this is really basic, but I couldn't find any guides/tutorials on how to do this between MSDN, Google searches, and stackoverflow.</p>
  
  <p>I created a new Windows Form Application and here I have Program and Form1 where Form1 owns 2 text boxes and buttons.</p>
  
  <p>Button1 is supposed to take the string from Text1 and send it to program.cs where the string gets edited and sent back to Form1. Then Button2 reveals the new string in Text2.</p>
  
  <p>I got as far as obtaining the string from the Text1 (with Button1), but cannot figure out how to send it to program.cs so it can be processed. What exactly am I supposed to do to pass data between the two?</p>
  
  <p>I'm not sure if this is the right start, but I created a myForm in attempts to get the string sent over. But how do I send it back?</p>
  
  <p>In Program.cs:</p>
  
  <pre><code>static Form1 myForm;
  [STAThread]
  static void Main()
  {
  
      string s1, s2;
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      myForm = new Form1();
      Application.Run(myForm);
      s1 = myForm.sendOver();
  
  }
  </code></pre>