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

Recommended Answers

All 2 Replies

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();

thanks....it solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.