title: How to use properties of text boxes outside of the current context in visual studio
body: <p>I'm rather new to coding and ran into a small problem. I have a button that creates a new text box every time it's clicked:</p>
  
  <pre><code>public void button1_Click(object sender, EventArgs e)
      {
          Point newLoc = new Point(12, 37);
  
          button1.Location = new Point(12, button1.Location.Y + 25);
  
          TextBox newBoxx = new TextBox();
          newBoxx.Size = new Size(65, 20);
          newBoxx.Location = new Point(12, button1.Location.Y - 25);
  
          Controls.Add(newBoxx);
      }
  </code></pre>
  
  <p>I now want to be able to call and use the text entered into those boxes by the end user in a different method (i.e. another button click), but I run into errors relating to to the text box not existing in the context. So for the sake of simplicity lets say I wanted to press a button and change a lable to the text pulled from one of these boxes:</p>
  
  <pre><code>public void button2_Click(object sender, EventArgs e)
      {
          lable1.Text = newBoxx.Text;
      }
  </code></pre>
  
  <p>How would I have to edit these, to allow for the use of newBoxx.text?</p>