Calculator

Design

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

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

        private void AC(object sender, EventArgs e)
        {
            textBox1.Text = "";
        } 
        
        private void Equals_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            textBox1.Text = dt.Compute(textBox1.Text, "").ToString();
        }
        
        private void Button1_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "1";
        }
        
        private void Button2_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "2";
        }
        
        private void Button3_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "3";
        }
        
        private void Button4_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "4";
        }
        
        private void Button5_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "5";
        }
        
        private void Button6_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "6";
        }
        
        private void Button7_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "7";
        }
        
        private void Button8_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "8";
        }
        
        private void Button9_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "9";
        }
        
        private void Button0_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "0";
        }
        
        private void ButtonDot_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + ".";
        }
        
        private void ButtonPlus_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "+";
        }
        
        private void ButtonMinus_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "-";
        }
        
        private void ButtonMultiply_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "*";
        }
        
        private void ButtonDivide_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "/";
        }
        
        private void ButtonModulus_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "%";
        }
        
        private void ButtonPlusMinus_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox1.Text + "+/-";
        }
    }
}
          

Output