How to make xor result equal in c# and javascript -


i'm trying convert javascript code c# code. @ point, in javascript, have expression this:

var result = 8797569417216^909522486; 

the result variable contains value 1849046582. have heard javascript uses 32bit numbers bitwise operators, don't know how use information same results in c#. when ran same line of code, result contains 8797942068790.

what missing?

you can convert result int:

var result = 8797569417216^909522486; var realresult = unchecked((int) result); 

note unchecked, because value larger int32.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -