sum - cannot implicitly convert type 'int' to 'string' in C# -
i want make programs sum 2 number in 2 text box it's not working. don't know why. (and sorry bad english skill xd).
here's code :
textbox3.text = convert.toint32(textbox1.text) + convert.toint32(textbox2.text);
since result of operation not string int have call tostring() assign string value textbox3.text
textbox3.text = (convert.toint32(textbox1.text) + convert.toint32(textbox2.text)).tostring();
working code:
string y = ""; y = (convert.toint32("3") + convert.toint32("4")).tostring();
Comments
Post a Comment