Try parsing the content into integers, if that works add otherwise concatenate.
private void button_Click(object sender, EventArgs e)
{
int a;
int b;
if (Int32.TryParse(textBox1.Text, out a) && Int32.TryParse(textBox2.Text, out b))
textBox3.Text = Convert.ToString(a + b);
else
textBox3.Text = textBox1.Text + textBox2.Text;
}
Hope this helps,
Fredrik