CSharp examples for System:Byte Array
Parse Int from byte array
using System.Text; using System;// w w w . ja v a 2 s.c o m public class Main{ public static bool ParseInt(this byte[] data, out int result, int offset, int length) { result = 0; var str = string.Empty; for (int i = offset; i < offset + length; i++) { str += (char)(data[i]); } int d; if (Parse.TryParseInt(str, out d)) { result = d; return true; } return false; } }