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);