CSharp examples for System:Byte Array
Convert byte array To Hex String
using System.Text; using System.IO;// ww w. jav a 2s . co m using System.Globalization; using System; public class Main{ public static string ToHex(this byte[] array) { StringBuilder stringBuilder = new StringBuilder(array.Length * 2); for (int index = 0; index < array.Length; ++index) stringBuilder.Append(array[index].ToString("x2")); return stringBuilder.ToString(); } }