You get the error because the variables are in two different data types.
You have two options. You can either convert the string value to number format, or you can convert the number value to string.
Depends on what you want to get as the output. If both are in string, it will not add the values, but it will concat them.
If both are in integer, it will add the values…
Try these two…
String to integer
Converts string value to integter
integer to string
Applying to your expression
- Ex: C = 1, A = “2”
C + Int32.Parse(A) result is: 3
C.ToString + A result is: 12
Does it help?