Perdona lo puse directamente y no cai en los valores nulos ("")
Código:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.textBox1.TextChanged += new EventHandler(textBox_TextChanged);
this.textBox2.TextChanged += new EventHandler(textBox_TextChanged);
this.textBox3.TextChanged += new EventHandler(textBox_TextChanged);
}
private void textBox_TextChanged(object sender, EventArgs e)
{
double x = 0;
double y = 0;
double z = 0;
if (textBox1.Text != "")
{
x = Convert.ToDouble(textBox1.Text);
}
if (textBox2.Text != "")
{
y = Convert.ToDouble(textBox2.Text);
}
if (textBox3.Text != "")
{
z = Convert.ToDouble(textBox3.Text);
}
textBox4.Text = Convert.ToString(x + y + z);
}
}