I have added code for plus button, but how i write code for other buttons? My code is
double total1 = 0;
double total2 = 0;
private void plus_Click(object sender, EventArgs e)
{
total1 = total1 + double.Parse(textBox1.Text);
textBox1.Clear();
}
private void equal_Click(object sender, EventArgs e)
{
total2 = total1 + double.Parse(textBox1.Text);
textBox1.Text = total2.ToString();
total1 = 0;
}
private void minus_Click(object sender, EventArgs e)
{
total1 = double.Parse(textBox1.Text) - total1;
textBox1.Clear();
}
private void divide_Click(object sender, EventArgs e)
{
total1 = total1 + double.Parse(textBox1.Text);
textBox1.Clear();
}
private void multiply_Click(object sender, EventArgs e)
{
total1 = total1 + double.Parse(textBox1.Text);
textBox1.Clear();
}