How to get the hex string of a floating point number?

  • Thread starter Thread starter Guest
  • Start date Start date
How to get the hex string of a double floating point number (internal 8 bytes)?

Something like
BitConverter.DoubleToInt64Bits(yourDoubleValue).ToString("X")


Mattias
 
nick said:
How to get the hex string of a double floating point number (internal 8 bytes)?

Use BitConverter.DoubleToInt64Bits to represent the double as a long,
and then format the long as a hex string using the 'X' format
specifier.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top