We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
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;
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.