Casting a hex number under unchecked scope

0

Well I am trying to understand how negative numbers work and trying to cast a hex number as we can see below to a singed integer, but the question is why does this work only under "unchecked" scope?

 unchecked
 {
     signedInt = (int)0xffffffff; // -1 (1111........ 1111)
     signedInt = (int)0xfffffffd; // -3 (1111........ 1101)

 }
c#
binary
hex
asked on Stack Overflow Mar 17, 2016 by Mihail Georgescu • edited Mar 17, 2016 by ΦXocę 웃 Пepeúpa ツ

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0