I have a windows application in C #, in the form I have 12 shortcuts with names
label1, label2 , ...............
I have an array of 12 numbers (after some calculation)
like:
int[] nums = new int[12] {1, 0, 4, 6,.............};
I want to assign a value from an array in a loop to each label element. Accordingly
sort of
for (int i = 1; i <= 12; i++) {
label+i.Text = nums[i-1].ToString();
}
What is an effective way to do this?
thank
source
share