CSharp examples for System:Byte Array
Parse Float from byte array
using System.Text; using System;// w w w .j a va 2 s . com public class Main{ public static bool ParseFloat(this byte[] data, out float result, int offset, int length) { result = 0; var str = string.Empty; for (int i = offset; i < offset + length; i++) { str += (char)(data[i]); } double d; if (Parse.TryParseDouble(str, out d)) { result = (float)d; return true; } return false; } }