C
C#17mo ago
Austin9675

Winforms int problem

I want the user to be able to enter an int no matter their input, 59 or 59.99, is there a way to do this ?
4 Replies
SinFluxx
SinFluxx17mo ago
Do you mean you want the value to remain as 59.99 if that's what they enter?
Austin9675
Austin9675OP17mo ago
like this yes, i want it to be an int so that way i can have the program calculate the total every time they add a part. When I add whole numbers its no issue but when i start using decimals its an error
SinFluxx
SinFluxx17mo ago
Yes, an int has no decimal part You probably want to use decimal instead
ero
ero17mo ago
Use a NumericUpDown control

Did you find this page helpful?