VS19 16.9.688.6828
Writing a simple C# app as an exercise to try to get my brain working after six years I hit a problem I don't recall. I ran some simple code and it seems that C# doesn't allow arithmetic and bitwise ops on 8 and 16 bit numbers viz:
Code:
         ushort a = 0xf;
         ushort b = 0x7;
         ushort c = 0x3;
         a = b + c; // error
         a = b & c; // error
         a = a + b; // error
         a += b;    // no error
         a = (ushort)((int)a + (int)b);  // no error
//implicit cast
         uint d = 0x1;
         d = (uint)(a + b);  // no error
         d = d + a;  // no error
I can't believe this is a bug so can somebody please explain the thinking behind this apparent inconsistency?
No luck finding an explanation in VS19 help!