there's a Java method Double.doubleToLongBits
that basically gets a double
and return a long
with the same bits.
How can I do it in C#?
Thank you
BitConverter.DoubleToInt64Bits
would be a good alternative.
http://msdn.microsoft.com/en-us/library/system.bitconverter.doubletoint64bits.aspx
You'll want BitConverter.DoubleToInt64Bits
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