private void btnCalc_Click(object sender, EventArgs e)
{
double a = 0;
double b = 0;
string s_a = txtA.Text;
bool success1 = double.TryParse(s_a, out a);
if (success1 == false)//user enter wrong data
errors.SetError(txtA, "Неверный формат ввода. Введите число");
else
errors.SetError(txtA, "");
bool success2 = double.TryParse(txtB.Text, out b);
if (success2 == false)
errors.SetError(txtB, "Неверный формат ввода. Введите число");
else
errors.SetError(txtB, "");
textBox3.Text = (a + b).ToString();
//textBox3.Text = ;
}