It compiles, but it runs to completion only in an unchecked
context, which is the compiler default. Adding a checked
block (or specifying the /checked
compiler option) will give you an overflow exception at runtime.
If in an unchecked context, the result is 1
because the multiplication goes like this:
0x ffff ffff
* 0x ffff ffff
= 0x ffff fffe 0000 0001
The high-order bits that overflow are discarded, leaving you with 0x 0000 0001
.