views:

61

answers:

2

hi, I'm using numericUpDown with C# to represent integers. But there is a problem representing "big values". For instance if I assgin 127 to numericUpDown, it's displayed correctly. However, if I assign 12912347 it gets rounded to 12912350.

How can I avoid numericUpDown rounding integers?

(numericUpDown settings are: DecimalPlaces 0; Maximum 4294967295; Minimum 0)

+1  A: 

All of the are decimal values and it easily covers your range. Also i'm not able to reproduce this.

So it seems, that there is a problem somewhere else in your code that performs such a rounding.

Oliver
A: 

sorry, my mistake indeed. I used an invoke and there sth like this was done: float value = 12912347f; numericUpDown1.Value = Convert.ToDecimal(value); this conversion caused the rounding.

This question should probably be deleted.

bitman
You can hit delete.
Henk Holterman