I'm not sure what you want. Is it the hex representation of the bits used to represent the float value? If so, you can use something like this:
using System;
using System.Text;
namespace Text {
class Program {
static void Main() {
float f = -2.07217f;
byte[] b = BitConverter.GetBytes(f);
StringBuilder sb = new StringBuilder();
foreach (byte by in b) {
sb.Append(by.ToString("X"));
}
Console.WriteLine(sb.ToString());
Console.ReadLine();
}
}
}
Momerath
Nearly a Senior Poster
3,386 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558