/// <summary>
/// BCD转字符串
/// </summary>
/// <param name="bcdNum"></param>
/// <param name="offset">偏移量</param>
/// <param name="numlen">数字字符串位数</param>
/// <returns></returns>
/// <remarks></remarks>
public static string BCDToString(byte[] bcdNum, int offset, int numlen)
{
string retString = "";
int res;
var len = Math.DivRem(numlen, 2, out res);
if (res != 0)
{
len++;
}
for (int i = 0; i < len; i++)
{
retString += ((bcdNum[i + offset] & 0xf0) >> 4).ToString("x");
retString += (bcdNum[i + offset] & 0xf).ToString("x");
}
return retString.ToLower().Replace("f", "");
}