I have a WPF application with many labels.
....
How about this?
List labelL = new List(); for(int i = 1; i<40 ;i++) labelL.Add(new Label{ Name = "label"+i, Content = i*10 });
The end result will be this.
label1.Text = 10; label2.Text = 20; label3.Text = 20; ... ...