I am making a stock market game and I want to display an array of int as labels.
I don’t want to manually put it in for ever label. Is there a way to do this. I am using Visual Studio programming in C#.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Have a TableLayoutPanel on your form, so you can add controls to add and have them aligned and positioned automatically.
Then, to repopulate the labels according to your list of ints:
If all you want is a method to get an array of ints and return an array of labels, then:
Or without linq: