New feature! Upgrade and increase expert visibility of your issues with Priority Questions.
but I can't do this:
ushort x = 0xFFFF; ushort y = x; y &= 0x01FF;
I get the error: Cannot implicitly convert type 'int' to 'ushort'. An explicit conversion exists (are you missing a cast?)
ushort y = x & 0x01FF;
What is the proper syntax for this?
ushort y = (ushort)x & (ushort)0x01FF;
Join the community of 500,000 technology professionals and ask your questions.