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 WindowsFormsApplication8
{
public partial class Form1 : Form
{
double deger1;
double deger2;
char isaret;
public Form1()
{
InitializeComponent();
}
private void button_1_Click(object sender, EventArgs e)
{
string a = ("1");
textBox1.AppendText(a);
}
private void button_2_Click(object sender, EventArgs e)
{
string a = ("2");
textBox1.AppendText(a);
}
private void button_3_Click(object sender, EventArgs e)
{
string a = ("3");
textBox1.AppendText(a);
}
private void button_4_Click(object sender, EventArgs e)
{
string a = ("4");
textBox1.AppendText(a);
}
private void button_5_Click(object sender, EventArgs e)
{
string a = ("5");
textBox1.AppendText(a);
}
private void button_6_Click(object sender, EventArgs e)
{
string a = ("6");
textBox1.AppendText(a);
}
private void button_7_Click(object sender, EventArgs e)
{
string a = ("7");
textBox1.AppendText(a);
}
private void button_8_Click(object sender, EventArgs e)
{
string a = ("8");
textBox1.AppendText(a);
}
private void button_9_Click(object sender, EventArgs e)
{
string a = ("9");
textBox1.AppendText(a);
}
private void button_0_Click(object sender, EventArgs e)
{
string a = ("0");
textBox1.AppendText(a);
}
private void button_comma_Click(object sender, EventArgs e)
{
string a = (".");
textBox1.AppendText(a);
}
private void button_sqrt_Click(object sender, EventArgs e)
{
double a=double.Parse(textBox1.Text);
a = Math.Sqrt(a);
textBox1.Text = a.ToString();
}
private void button_topla_Click(object sender, EventArgs e)
{
deger1 = double.Parse(textBox1.Text);
textBox1.Clear();
isaret = '+';
}
private void button_cikart_Click(object sender, EventArgs e)
{
string a = ("-");
textBox1.AppendText(a);
isaret = '-';
}
private void button_carp_Click(object sender, EventArgs e)
{
string a = ("*");
textBox1.AppendText(a);
}
private void button_bol_Click(object sender, EventArgs e)
{
string a = ("/");
textBox1.AppendText(a);
}
private void button_kalan_Click(object sender, EventArgs e)
{
string a = ("%");
textBox1.AppendText(a);
}
private void button_square_Click(object sender, EventArgs e)
{
string a = ("^");
textBox1.AppendText(a);
}
private void button_equalto_Click(object sender, EventArgs e)
{
deger2 = double.Parse(textBox1.Text);
textBox1.Clear();
double cevap = 0;
string a;
switch (isaret)
{
case '+':
cevap = deger1 + deger2;
break;
case '-':
cevap = deger1 - deger2;
break;
}
cevap = deger2 + deger1;
a=cevap.ToString();
textBox1.Text(a);
}
}
private void button_clear_Click(object sender, EventArgs e)
{
textBox1.Clear();
}
}
}
hello. first of all, its not a homework. just self-study.
so please can you help me to solve the button_equalto_Click(marked red) problem?