Input string was not in the correct format

Posted 08 October 2012 - 07:53 PM

Upon running the program below, coded using Visual Studio 2010, I received the error "Input string was not in the correct format". I have attempted to fix it for some time now, but I fail to understand just why I receive that message.

The program is simple. The user enters the amount of tickets sold for each class of tickets. There is class A, B, and C. Each ticket costs a certain amount, and the only calculation done is multiplying the amount they enter by the cost of the ticket. Finally, the result of each of these calculations is added together for the total cost of all tickets combined.

1) The user input is collected in a textbox in the string format. For the purpose of calculations, I converted it to decimal.

2)After the calculations for the three numbers entered have been made, it is added together for the total cost. Then, I converted each of the results to a string, formatted them to be displayed in $ format, and finally, print them in the four boxes.

I do not understand why I receive the error message once the numbers are calculated. The code is below. Thank you for the help.