Double.doubleToLongBits equivalent in C#?
问题 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 回答1: BitConverter.DoubleToInt64Bits would be a good alternative. http://msdn.microsoft.com/en-us/library/system.bitconverter.doubletoint64bits.aspx 回答2: You'll want BitConverter.DoubleToInt64Bits 来源: https://stackoverflow.com/questions/6816691/double-doubletolongbits-equivalent-in-c