/// <summary>
/// byte数组转换成字符串
/// </summary>
/// <param name="bArray"></param>
/// <returns></returns>
public string convertByteToString(byte[] bArray)
{
string sResult = "";
try
{
for (int i = 0; i < bArray.Length; i++)
{
if (((UInt32)bArray[i]) <= 0xF)
{
sResult += "0" + string.Format("{0:X}", bArray[i]);
}
else
{
sResult += string.Format("{0:X}", bArray[i]);
}
}
return sResult;
}
catch (Exception exp)
{
throw exp;
}
}
注意:本文归作者所有,未经作者允许,不得转载