Search code examples
c#visual-studiowinformsroundingnumericupdown

numericUpDown prevent rounding int


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)


Solution

  • 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.