+ 2
Why does the addition of two char(char a, char b) equal a number(195)?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { char a = 'a'; char b = 'b'; Console.WriteLine(a); Console.WriteLine(b); Console.WriteLine(a + b); } } }
3 Respuestas
+ 10
'a' and 'b' in ASCII are 97 and 98, respectively.
Trying to add chars adds their ASCII values together.
Use Convert.ToChar(a + b) if you want a char result.
+ 8
yw ^.^
+ 2
Thank you