Archive

Posts Tagged ‘char’

In C#, ++c and c += 1 are not always equivalent

July 2, 2017 1 comment
csharp> char c = 'a'
csharp> ++c
'b'
csharp> c += 1
(1,7): error CS0031: Constant value `1' cannot be converted to a `char'
csharp>
Advertisements
Categories: csharp Tags: ,