Целочисленное суммирование блюз, короткий + = короткая задача

Программа на C #:

short a, b;
a = 10;
b = 10;
a = a + b; // Error : Cannot implicitly convert type 'int' to 'short'.

// we can also write this code by using Arithmetic Assignment Operator as given below

a += b; // But this is running successfully, why?

Console.Write(a);
68
задан Peter Mortensen 12 December 2010 в 00:01
поделиться