Code
//ffloat转换成hex

           
float num1 = 999999f;

            
// Convert to IEEE 754

            
uint num2 = BitConverter.ToUInt32(BitConverter.GetBytes(num1), 0);

//hex转换成float

            
// Hex representation

            
byte[] byteArray = BitConverter.GetBytes(num1);

            Array.Reverse(byteArray);

            
// Convert back to float

            
float num3 = BitConverter.ToSingle(BitConverter.GetBytes(num2), 0);


相关文章:

  • 2021-05-26
  • 2021-05-25
  • 2021-10-17
  • 2021-10-22
  • 2022-12-23
  • 2021-09-18
  • 2021-07-26
  • 2022-12-23
猜你喜欢
  • 2021-08-16
  • 2021-12-14
  • 2021-05-16
  • 2022-12-23
  • 2021-11-13
相关资源
相似解决方案