For my program, employees info are inputted – like ID, name, surname and yearly salary. I made the ID and salary box numericupdown but I want to make the salary box a textbox that only takes numbers.
however when i try to change from numericupdown to text box an error occurs saying “cannot implicitly convert “string” to “decimal”. I also have another button that finds the lowest salary etc but what is the problem? I want to create the exception to make the textbox only take numbers but it won’t let me :/
That looks to me like a casting error.
Try this instead:
And also look into
TryParse, which is cleaner.