I was shocked to know that there are no arithmetic operators + , - , * , / and % for 8 and 16 bit integers in C #. I read βC # 5.0 Pocket Referenceβ on page 23 as follows.

The following code does not compile.
class Program { static void With16Bit() { short a = 1; short b = 2; short c = a + b; Console.WriteLine(c); } static void With8Bit() { byte a = 1; byte b = 2; byte c = a + b; Console.WriteLine(c); } static void Main(string[] args) { With8Bit(); With16Bit(); } }
Why did C # designers do this? What is their opinion on this?
c #
kiss my armpit
source share