Hello Shanlu,
i have used C# to solve your query because u didn't mention any tags like C# or VB.NET or something anyways hers your code as per your requirement...
I feel you are a beginner so grab a good book for C# and start coding,
i have first converted the text entered into integer value and then added them displaying their result at third textbox
private void button1_Click(object sender, EventArgs e)
{
try
{
int x= int.Parse(textBox1.Text) + int.Parse(textBox2.Text);
textBox3.Text = x.ToString();
}
catch (Exception ex)
{
MessageBox.Show("Invalid text format for addition");
textBox1.Clear();
textBox2.Clear();
}
}
Now if you want that in your textboxes only number must be entered then you can refer to one of my answers here
Numeric Textbox by Radix
Do rate my answer once you find it useful
Thanks & Regards
Radix :rose: