trick to populate with decimal

  • Thread starter Thread starter Vinnie
  • Start date Start date
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?
 
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) {
....
 
Back
Top