Error - cannot get value when using variable at datetimepicker name
<p>I am using the following code,</p>

<p>I am getting error that timeStart is a null - it dont get its value.</p>

<p>no idea why is that...</p>

<p>here is the code:</p>

<pre><code>for (int i = 1; i &lt; 4; i++)
{
    DateTimePicker timeStart = (DateTimePicker)this.Controls["datetimeBi"+i];
    MessageBox.Show(timeStart.Value.ToString());
}
</code></pre>

<p>i have tried also </p>

<pre><code>DateTimePicker timeStart = (DateTimePicker)this.Controls["datetimeBi"+i.ToString()];
</code></pre>

<p>but it didnt worked also..</p>

<p>getting error always at the showbox becouse of the "no value" (NULL).</p>
