谁占用了CRIS

C# 各种进制转换

一、16进制文本转float

1 string hexString = "43480170";
2 uint num = uint.Parse(hexString, System.Globalization.NumberStyles.AllowHexSpecifier);
3 byte[] floatVals = BitConverter.GetBytes(num);
4 float f = BitConverter.ToSingle(floatVals, 0);
5 Console.WriteLine("float convert = {0}", f);

 

posted on 2019-07-30 13:48  谁占用了CRIS  阅读(92)  评论(0编辑  收藏  举报

导航