java中Hex.encodeHexString方法的c#实现
时间:2017-11-01 11:30:04
收藏:0
阅读:1658
public static string ToHexString(byte[] bytes) // 0xae00cf => "AE00CF " { string hexString = string.Empty; if (bytes != null) { StringBuilder strB = new StringBuilder(); for (int i = 0; i < bytes.Length; i++) { strB.Append(bytes[i].ToString("X2")); } hexString = strB.ToString(); } return hexString; }
原文:http://www.cnblogs.com/zcjiang/p/7765594.html
评论(0)