Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

this one is an eye opener and very humble too http://stackoverflow.com/questions/2186595/c-is-there-a-diff...

edit: also thanks for making me spend probably next several hours reading through all that stuff :)

edit2: oooh this one is good as well http://stackoverflow.com/questions/3110154/why-is-the-explic...

edit3: Not from Eric but check out this C# code:

    sbyte[] foo = new sbyte[] { -1 };
    var x = foo as byte[];    // doesn't compile
    object bar = foo;
    var f = bar as byte[];    // succeeds
    var g = f[0];             // g = 255
edit4: oh and check out this description of c# compiler actions http://stackoverflow.com/questions/1917935/how-does-c-compil...


Is twos compliment behavior guaranteed in C#?


Yes, check out the Partition I 12.1 table 6 of ECMA-335 standard




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: