Previous question was to encode two Int32 into one Int64 [C# - Making one Int64 from two Int32s
Question: How to decode one Int64 back to two Int32 ?
Something like this:
long x = ...;
int a = (int) (x & 0xffffffffL);
int b = (int) (x >> 32);
It's just possible that the masking in the first form is unnecessary... I can never remember the details around narrowing conversions and signed values, which is why I've included it :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With