Hi All,
Why is adding two char in C# results to an int type?
For example, when I do this:
var pr = 'R' + 'G' + 'B' + 'Y' + 'P';
the pr variable becomes an int type. I expect it to be a string type with a value of "RGBYP".
Why is C# designed like this? Wasn't the default implementation of adding two chars should be resulting to a string that concatenates the chars, not int?
Thanks in advance.
AVADHESH PATEL
06-Jun-2013