0

hi helper..

i tried search many time to search this but still dont have the answer

here is my code..

textBox11.Text = Convert.ToString(textBox3.Text) - Convert.ToString(textBox4.Text);

and it error : Operator '-' cannot be applied to operands of type 'string' and 'string'

please help me..im new in programming

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by sitieda
0

You can use int.TryParse method to convert String to integer.

int no1,no2,no3;

 int.TryParse(textBox3.Text, out no1);
 int.TryParse(textBox4.Text, out no2);

 no3= no1 - no2;

 textBox11.Text= no3.ToString();
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.