private void button1_Click(object sender,System.EventArgs e)
{
try{
double x=double.Parse(textBox1.Text);
double y=double.Parse(textBox2.Text);
double z;
if(j.Checked)
{
z=x+y;
textBox3.Text=z.ToString();
}
if(j2.Checked)
{
z=x-y;
textBox3.Text=z.ToString();
}
if(c.Checked)
{
z=x*y;
textBox3.Text=z.ToString();
}
if(c2.Checked)
{
z=x/y;
textBox3.Text=z.ToString();
}
catch(Exception ex)
{
Messagebox.show(...);
return;
}
}