0

Hey,

For some reason the numericUpDown is a decimal or a double or one of those ;)

I find that annoying, but whatever. So how do I use it as an int? Int32.Parse(); only works for strings.

2
Contributors
1
Reply
4
Views
7 Years
Discussion Span
Last Post by Momerath
1

It's a decimal, and you covert it by doing this int myInt = (int)myUpDown.Value; .

Note that if you allow values outside of the normal Int32 range the value you get will be wrong :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.