11,578 questions
According to “CSharp Language Specification” (Section 7.3.6.2 Binary numeric promotions), both short operands of your code are converted to type int. The “+” operator is not defined separately for short. It works for int and the result is int. Therefore, the result should be converted to short (for example: short z = (short)(x + y)). Errors are possible if the result cannot be short.