✅ how to set the outputs to do all the math

im trying to get it to add the variebles from the variebls with the clicks to output the addition for given numbers into
a output textbox


this is my code


namespace Uber
{

    public partial class Form1 : Form
    {
        double[,] uberfares = { { 2.50, 0.18, 0.81, 2.75 }, { 5.00, 0.35, 1.55, 3.00 }, { 5.00, 0.35, 1.80, 3.60 } };

        int selectedbutton = 0;

        public Form1()
        {
            InitializeComponent();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            basefareoutput.Text = selectedbutton.ToString();


        }

        private void Form1_Load(object sender, EventArgs e)
        {
            int pickup;
            int destantion;
            int distance;
            int traveltime;
            int basefare;
            int permin;
            int perkm;
            int bookingfee;
            int totalfare;

        }

        private void textBox9_TextChanged(object sender, EventArgs e)
        {
            //   int sub = (2.50) + (quantityMin * 0.18) + (quantityBookinfee * 2.75); 



        }
        // this changes colours of buttons when clicked and other buttons colours
        private void uberxbutton_click(object sender, EventArgs e)
        {

            uberxbutton.BackColor = SystemColors.ControlDark;

            uberxlbutton.BackColor = SystemColors.Control;

            uberselectbutton.BackColor = SystemColors.Control;

            selectedbutton = 1;

        }

        private void uberxlbutton_Click(object sender, EventArgs e)
        {
            uberxlbutton.BackColor = SystemColors.ControlDark;

            uberxbutton.BackColor = SystemColors.Control;

            uberselectbutton.BackColor = SystemColors.Control;
            selectedbutton = 2;
        }

        private void uberselectbutton_Click(object sender, EventArgs e)
        {
            uberselectbutton.BackColor = SystemColors.ControlDark;

            uberxlbutton.BackColor = SystemColors.Control;

            uberxbutton.BackColor = SystemColors.Control;
            selectedbutton = 3;

        }
    }
}
image.png
Was this page helpful?