C#//字节数组转16进制字符串

//字节数组转16进制字符串
private static string byteToHexStr(byte[] bytes,int length)
{
string returnStr = "";
if (bytes != null)
{
for (int i = 0; i < length; i++)
{
returnStr += bytes[i].ToString("X2");
}
}
return returnStr;
}

猜你喜欢

转载自www.cnblogs.com/shuaiheng/p/9194547.html