title: C# Get textBox value from another class
body: <p>Let's say I have a form named Form1 with textBox and button in it.</p>
  
  <p>I want to get the textBox value from another class on button click.
  I'm trying to do it like this, but it doesn't work:</p>
  
  <pre><code>class Main
  {
      public void someMethod()
      {
          Form1 f1 = new Form1();
          string desiredValue = f1.textBox.Text;
      }
  }
  </code></pre>
  
  <p>Forgive me for the dumb question, but I'm pretty new in C# and can't get this thing to work.</p>