G
Guest
I need to create many labels to fit on a windows forms and instead of using
the designer to create a large number of text labels I just wanted to make an
array of them and then loop through them to set their properties.
when trying this code
Label labelArray[,] = new Label[8,8];
I get an error of invalid type for __gc array element
what would be the correct way of creating this, if it is possible.
*note I need so many text labels because I am doing a graphical solution to
the Knights tour. Knights tour is a program that tries to find a way that a
knight can move to each position on the board only once. It will show the
"move number" in each square on a chess board that the knight has visited.
the designer to create a large number of text labels I just wanted to make an
array of them and then loop through them to set their properties.
when trying this code
Label labelArray[,] = new Label[8,8];
I get an error of invalid type for __gc array element
what would be the correct way of creating this, if it is possible.
*note I need so many text labels because I am doing a graphical solution to
the Knights tour. Knights tour is a program that tries to find a way that a
knight can move to each position on the board only once. It will show the
"move number" in each square on a chess board that the knight has visited.