Writing a pretty simple cost calculator, and everything is coming out right except the total of everything. Why is the total for everything displaying placeholders instead of numbers, and how can I fix it? I really appreciate any input, thanks!
Name:  error.png
Views: 275
Size:  29.4 KBName:  framework.png
Views: 204
Size:  14.6 KB

Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace StadiumSeating
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void calculaterevenueButtonrm_Click(object sender, EventArgs e)
        {
            try
            {

                // Declaring for user inputed ticket totals
                decimal classatickets;
                decimal classbtickets;
                decimal classctickets;
                classatickets = decimal.Parse(classaTextBoxrm.Text);
                classbtickets = decimal.Parse(classbTextBoxrm.Text);
                classctickets = decimal.Parse(classcTextBoxrm.Text);



                // Storing the cost of each ticket class
                decimal classacost = 15;
                decimal classbcost = 12;
                decimal classccost = 9;




                //Declaring names for the results of each class's calculations and how to calculate them
                decimal classatotal;
                decimal classbtotal;
                decimal classctotal;
                classatotal = classatickets * classacost;
                classbtotal = classbtickets * classbcost;
                classctotal = classctickets * classccost;
                classarevenueTextBoxrm.Text = classatotal.ToString("c");
                classbrevenueTextBoxrm.Text = classbtotal.ToString("c");
                classcrevenueTextBoxrm.Text = classctotal.ToString("c");

                // Define how to calculate the total sales
                decimal totalsales;
                totalsales = classatotal + classbtotal + classctotal;

                totalrevenueTextBoxrm.Text = totalsales.ToString("c");
                
            }
            catch (Exception ex)
            {
                //default error message
                MessageBox.Show(ex.Message);





            }
        }

        private void clearButtonrm_Click(object sender, EventArgs e)
        {
            classaTextBoxrm.Text = "";
            classbTextBoxrm.Text = "";
            classcTextBoxrm.Text = "";
            classarevenueTextBoxrm.Text = "";
            classbrevenueTextBoxrm.Text = "";
            classcrevenueTextBoxrm.Text = "";
            totalrevenueTextBoxrm.Text = "";

        }
    }
}