Good day, I cant figure out why i cant make the following Array:
Label[] labels = new Label[25] { label1, label2, label3, label4, ... label 25 };
Just underneath this statement i`ve got the Working Array:
int[] array2 = new int[] { 1, 3, 5, 7, 9 };
The error that VS gives me on the labels 1 to 25 are: a field initializer cannot reference the non-static, method, or property 'Class.Forms1.label1'
The next link shows us that the intarray is correct, but why is my LabelArray incorrect? http://msdn.microsoft.com/en-us/library/9b9dty7d.aspx
Note: both arrays are tested inside and outside an function.