Double.doubleToLongBits equivalent in C#?
there's a Java method Double.doubleToLongBits
that basic开发者_如何学Cally gets a double
and return a long
with the same bits.
BitConverter.DoubleToInt64Bits
would be a good alternative.
http://msdn.microsoft.com/en-us/library/system.bitconverter.doubletoint64bits.aspx
You'll want BitConverter.DoubleToInt64Bits
精彩评论