Hey guys! I'm making a program requires a listbox with numbers from 0.02-7. That's a lot of numbers to add one at a time. I tried to figure out a different way other than rateListBox.Items.Add("") but I can't really figure it out. Does anyone know now to do that?
hendersonl
0
Newbie Poster
Recommended Answers
Jump to PostOne relatively simple way would be with LINQ:
ListBox1.Items.AddRange(Enumerable.Range(2, 699).Select(Function(x) (x / 100).ToString).ToArray)
All 2 Replies
tinstaafl
1,176
Posting Maven
hendersonl
commented:
Thank you so much!! That worked perfectly!!
+0
Firstgamefreak
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.