There are even more variants of doing it, for example here. Return BitConverter.ToString(ba).Replace('-','')
Or: public static string ByteArrayToString(byte ba) StringBuilder hex = new StringBuilder(ba.Length * 2) NET you can either use: public static string ByteArrayToString(byte ba) There's also a method for the reverse operation: Convert.FromHexString.įor older versions of.
You can use Convert.ToHexString starting with.