Fun with byte arrays

Some easy and fun byte array extensions static class ByteArrayExtensions { public static string ToHexString(this byte[] bytes) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < bytes.Length; i++) { sb.AppendFormat(“{0:X2}”, bytes[i]); } return sb.ToString(); } public static byte[] Copy(this byte[] bytes) { byte[] result = new Read more…