title: a way to access "code generated" labels in C# winforms
body: <p>i don't want to waste your time with introductions, am just going to ask the question straight up.<br />
  am trying to make a dynamic form, where i can change what is inside of it through the parameters passed when the form is called, my problem occurs when i want to do something with the stuff i created outside of the creation method,<br />
  here is an extremely simplified example to hopefully better communicate the problem:</p>
  <pre><code> public partial class MyForm : Form
  {
      public MyForm()
      {
          InitializeComponent();
          CreateLabels();
          CreateButtons();
      }
      // creates and locates labels in the form
      private void CreateLabels()
      {
          Label Lbl = new Label();
          Lbl.Text = &quot;help please&quot;
          Lbl.Name = &quot;MainLabel&quot;;
          Lbl.Location = new Point(this.Width / 2, 30);
          this.Controls.Add(Lbl);
      }
      // creates and locates buttons in the form
      private void CreateButtons()
      {
          Button Btn = new Button();
          Btn.Name = &quot;Mainbuttom&quot;;
          Btn.Location = new Point(this.Width / 2, 100);
          Btn.BackColor = Color.Red;
          this.Controls.Add(Btn);
          Btn.Click += new EventHandler(button_click);
      }
      // does something when the user presses the button
      private void button_click(object sender, EventArgs e)
      {
          // do something with the labels created, e.g : save the text inside, change the text, etc.
      }
  }
  </code></pre>
  <p>ya, so i want to access the labels created somehow.<br />
  i wasted so much time on this i hope its not as simple as changing a parameter,<br />
  anyways, thanks for your time.</p>