Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
In attempting to define a short, I used:
private const short asdf = 0x82CD;
...and I got an error saying "Constant value '33485' cannot be converted to a 'short'", even though it should be valid. I can bypass this by using:
private const short asdf = -32051;
short range is -32768 to 32767
But 0x82CD should be a valid short, since:
0x82CD => 1000 0010 1100 1101 => -32051.
Is this correct?
Not really 0x82CD is a literal value which defaults to int
You probably want to write this
const short s = unchecked((short)0x82CD);
Ah, alright. Thank you Marek.