Hello,
I developping a .NET windows form application an need some help to create an
array of System.Windows.Forms.Label in order to be able to manage all of
them using index.
I'm trying to do this in form_load void:
System.Windows.Forms.Label[] labelArray = new
System.Windows.Forms.Label[91];
for (i=1;i<91;i++)
{
labelArray[i].Size = new System.Drawing.Size(33, 33);
labelArray[i].Location = new System.Drawing.Point(i, i);
labelArray[i].Text=i.ToString();
this.Controls.AddRange(new System.Windows.Forms.Control[] {labelArray[i]});
But at running time i get a 'System.NullReferenceException'
How do i have to create my array in order to avoid to create all labels at
design time.
Thanks in advance