bool h = false;

string k = "";

double value = 0;

public Form1()

{

InitializeComponent();

}

private void Form1_Load(object sender, EventArgs e)

{

}

private void button1_Click(object sender, EventArgs e)

{

if (a.Text == "0" || h) {

a.Clear();

}

Button b = (Button)sender;

a.Text = a.Text + b.Text;

}