txtA.txt
txtB.text
lblAnswer = txtA.text + txtB.text
If i input 1 and 1 i get 11 or if i input 2 and 2 i get 22 how can i add the two numbers as if they were ints and not join them as strings
txtA.txt
txtB.text
lblAnswer = txtA.text + txtB.text
If i input 1 and 1 i get 11 or if i input 2 and 2 i get 22 how can i add the two numbers as if they were ints and not join them as strings
Parse them into ints and add them together, instant string addition. :-)
Code:using System; class test { public static void Main() { string a = "2", b = "2"; Console.WriteLine(int.Parse(a) + int.Parse(b)); } }
*Cela*