trick to populate with decimal

V

Vinnie

When i try populate a dropdownlist menu using a for cycle i get a
list of integers from ( in example ) 1 to 10. How can populate the
same list, if working on the code (C#) i wish to get not longer a
series of integers, but a series of decimals?

Like this:
old list: (for i=1; i<=100; i++) i get 100 integers;

New list) i want to populate the same list, but using the decimals:
1.00; 1.01; 1.02; 1.03.... 99.99, 100.00

Is it possible?

Any suggestion?
 
G

Guest

When i try populate a dropdownlist menu using a for cycle i get a
list of integers from ( in example ) 1 to 10. How can populate the
same list, if working on the code (C#) i wish to get not longer a
series of integers, but a series of decimals?

Like this:
old list: (for i=1; i<=100; i++) i get 100 integers;

New list) i want to populate the same list, but using the decimals:
1.00; 1.01; 1.02; 1.03.... 99.99, 100.00

Is it possible?

Any suggestion?

for (float i = 1.00F; i <= 100; i=i+.01F) {
....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top