标签:pre sharp static build hex enc csharp UI 实现
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;
}
java中Hex.encodeHexString方法的c#实现
标签:pre sharp static build hex enc csharp UI 实现
原文地址:http://www.cnblogs.com/zcjiang/p/7765594.html