title: Accessing text box from other thread
body: <p>I am writing text to text box from another thread using code as below</p>
  
  <pre><code>delegate void SetTextCallback(string text);
  private void SetText1(string text)
      {
          if (this.textBox7.InvokeRequired)
          {
              SetTextCallback d = new SetTextCallback(SetText1);
              this.Invoke(d, new object[] { text});
          }
          else
          {
              this.textBox7.Text = text;
          }
  }
  </code></pre>
  
  <p>Now I have to write text to multiple text boxes (eg textBox8, 9, 10). I wanted this same function <strong>SetText1</strong> to work. SO is there a way that I can make textBox7 variable in this function and use the textbox I intend to write from the other thread. </p>
  
  <p>Otherwise if I follow my current approach, then if I want to write to ten textboxes I will need ten <strong>SetText functions</strong></p>