I had created a windows form.in that form there are 6 textbox’s, I need to add the values entered in that 5textbox’s and display in the 6th textbox in C#.net.
I’ve tried the following code:
txtbox6.Text = (Decimal.Parse(txtbox1.Text) + Decimal.Parse(txtbox2.Text)+
(Decimal.Parse(txtbox3.Text)+(Decimal.Parse(txtbox4.Text)+
(Decimal.Parse(txtbox5.Text)).ToString();
And what if the text in one of the textboxes isn’t a number? You could try something like this: