How to get value of programmatically created NumericUpDown?
<p>I have program which creates multiple NumericUpDowns depending on user input (1-5).  I know how to get total value but how can I get value of each individual NumericUpDown. I was trying to test this using label1 but I get NullReferenceException error.</p>

<pre><code>   NumericUpDown test= new NumericUpDown();
    test.Name = "mynum" + Convert.ToString(count2);
    numericUpDown.Add(test);
    System.Drawing.Point i = new System.Drawing.Point(8, 20+ i * 25);
    test.Location = i;
    test.Size = new System.Drawing.Size(50, 20);
    this.Controls.Add(test);
    test.ValueChanged += new EventHandler(mytotal);
</code></pre>

<p>NullReferenceException error is thrown at this line.</p>

<pre><code>label1.Text = test.Controls["mynum0"].Text;
</code></pre>
