Is there a way to use the NumericUpDown control without a maximum or minimum value?
tdeck 7 Light Poster
Recommended Answers
Jump to PostMSDN says
To specify the allowable range of values for the control, set the Minimum and Maximum properties. Set the Increment value to specify the value to be incremented or decremented to the Value property when the user clicks the up or down arrow buttons. You can increase the speed …
Jump to PostNumericUpDown does not work with integer but with the data type decimal It ranges from +-1.0 X 10e-28 to +-7.9 X 10e28.
Jump to PostYes and no. MyNumericUpDown.Value is always something of type decimal, so if you want an int you still have to do a cast or a conversion. Like :
int myInt = (int)MyNumericUpDown.Value;
Be aware for overflow, the range of an int is smaller than the range of a decimal.
All 9 Replies
Ramy Mahrous 401 Postaholic Featured Poster
tdeck 7 Light Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
tdeck 7 Light Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
tdeck 7 Light Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
tdeck 7 Light Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.