c#16進制轉浮點數單精度類型:
string s = "4144147B"; MatchCollection matches = Regex.Matches(s, @"[0-9A-Fa-f]{2}"); byte[] bytes = new byte[matches.Count]; for (int i = 0; i < bytes.Length; i++) bytes[i] = byte.Parse(matches[i].Value, System.Globalization.NumberStyles.AllowHexSpecifier); float m = BitConverter.ToSingle(bytes.Reverse().ToArray(), 0); Console.WriteLine(m);