kodda çok fazla analiz hatası var. form kısmını aşağıdaki şekilde deneyin tabi diğer dökümanları da formla birlikte görebilseydik çok daha iyi olurdu.


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 said
{
public partial class Form1 : Form
{
decimal sayi1, sayi2, sonuc;
string Islem;
int digit;
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{

}
private void yaz(string sayi)
{
if (TxtEkran.Text == "0.00")
{
digit = 1;
TxtEkran.Text = sayi.ToString();
}
else
{
digit = digit + 1;
TxtEkran.Text = TxtEkran.Text + sayi.ToString();
}
}

private void Btn0_Click(object sender, EventArgs e)
{
yaz("0");
}



private void Btn1_Click(object sender, EventArgs e)
{
yaz("1");
}

private void Btn3_Click(object sender, EventArgs e)
{
yaz("3");
}

private void Btn2_Click(object sender, EventArgs e)
{
yaz("2");
}

private void Btn4_Click(object sender, EventArgs e)
{
yaz("4");
}

private void Btn5_Click(object sender, EventArgs e)
{
yaz("5");
}

private void Btn6_Click(object sender, EventArgs e)
{
yaz("6");
}

private void Btn7_Click(object sender, EventArgs e)
{
yaz("7");
}

private void Btn8_Click(object sender, EventArgs e)
{
yaz("8");
}

private void Btn9_Click(object sender, EventArgs e)
{
yaz("9");
}

private void BtnC_Click(object sender, EventArgs e)
{
TxtEkran.Text = "0.00";
TxtIslem.Text = "";
digit = 0;
sonuc = 0;
sayi1 = 0.00m;
sayi2 = 0.00m;
}

private void BtnTopla_Click(object sender, EventArgs e)
{


topla();
}

private void BtnEsit_Click(object sender, EventArgs e)
{
switch (Islem)
{
case "+":
topla();
TxtIslem.Text = sonuc.ToString();
Islem = null;
sonuc = 0.00m;
break;
case "-":
Cikar();
TxtIslem.Text = sonuc.ToString();
Islem = null;
sonuc = 0.00m;
break;
case "/":
break;
case "*":
break;

}


}

private void Cikar()
{
Islem = "-";
if ((TxtEkran.Text != "0.00") && (Islem != null))
{
TxtIslem.Text = TxtIslem.Text + TxtEkran.Text + " - " + "\r" + "\n";

}
else
{
// sayi1 = Convert.ToDecimal(TxtIslem.Text);
TxtIslem.Text = TxtIslem.Text + " - " + "\r" + "\n";

}

if (sayi1 == 0.00m)
{
try
{
sayi1 = Convert.ToDecimal(TxtEkran.Text);
TxtEkran.Text = "0.00";


}
catch (Exception)
{

TxtEkran.Text = "0.00";
}

}
else if (sayi2 == 0.00m)
{
try
{
sayi2 = Convert.ToDecimal(TxtEkran.Text);
TxtEkran.Text = "0.00";
sonuc = sayi1 - sayi2;
sayi1 = sonuc;
sayi2 = 0.00m;
TxtEkran.Text = "0.00";
}
catch (Exception)
{

TxtEkran.Text = "0.00";
}


}






}

private void topla()
{
Islem = "+";
if ((TxtEkran.Text != "0.00") && (Islem != null) )
{
TxtIslem.Text = TxtIslem.Text + TxtEkran.Text + " + " + "\r" + "\n";

}
else
{
// sayi1 = Convert.ToDecimal(TxtIslem.Text);
TxtIslem.Text = TxtIslem.Text+ " + " + "\r" + "\n";

}

if (sayi1 == 0.00m)
{
try
{
sayi1 = Convert.ToDecimal(TxtEkran.Text);
TxtEkran.Text = "0.00";


}
catch (Exception)
{

TxtEkran.Text = "0.00";
}

}
else if (sayi2 == 0.00m)
{
try
{
sayi2 = Convert.ToDecimal(TxtEkran.Text);
TxtEkran.Text = "0.00";
sonuc = sayi1 + sayi2;
sayi1 = sonuc;
sayi2 = 0.00m;
TxtEkran.Text = "0.00";
}
catch (Exception)
{

TxtEkran.Text = "0.00";
}


}






}

private void BtnCikar_Click(object sender, EventArgs e)
{
Cikar();
}
}
}





// private void button11_Click(object sender, EventArgs e)
// {
// a = Convert.ToInt16(textBox1.Text);
// d = "+";
// textBox1.Text = "";
// }

// private void button12_Click(object sender, EventArgs e)
// {
// a = Convert.ToInt16(textBox1.Text);
// d = "-";
// textBox1.Text = "";
// }

// private void button13_Click(object sender, EventArgs e)
// {
// a = Convert.ToInt16(textBox1.Text);
// d = "*";
// textBox1.Text = "";
// }

// private void button14_Click(object sender, EventArgs e)
// {
// a = Convert.ToInt16(textBox1.Text);
// d = "/";
// textBox1.Text = "";
// }

// private void button16_Click(object sender, EventArgs e)
// {
// b = Convert.ToInt16(textBox1.Text);
// if (d == "")
// {

// }


// if (d == "+")
// {
// textBox1.Text = Convert.ToString(a + b);
// }
// if (d == "-")
// {
// textBox1.Text = Convert.ToString(a - b);
// }
// if (d == "*")
// {
// textBox1.Text = Convert.ToString(a * b);
// }
// if (d == "/")
// {
// textBox1.Text = Convert.ToString(a / b);
// }
// }

// private void Form1_Load(object sender, EventArgs e)
// {
// d = "";
// }

// private void button15_Click(object sender, EventArgs e)
// {
// a = 0;
// b = 0;
// d = "";
// textBox1.Text = "0";
// }



// }
//}