#region C# 字节转Int
public static int GetValue(byteby)
{returnConvert.ToInt32(by);
}#region 16进制转十进制 高字节在前
///
///16进制转十进制 高字节在前///
///
///
public static int GetValue(ListAry)
{double result = 0;var cm = 0;
cm=Ary.Count;foreach (var item inAry)
{if (cm - 1 == 0)
{
result+=item;
}else{
result+= item * Math.Pow(16, (cm * 2 - 2));
cm--;
}
}returnConvert.ToInt32(result);
}///
///高字节在前///
///
///
public static int GetValue(IEnumerableAry)
{double result = 0;var cm = 0;
cm=Ary.Count();foreach (var item inAry)
{if (cm - 1 == 0)
{
result+=item;
}else{
result+= item * Math.Pow(16, (cm * 2 - 2));
cm--;
}
}returnConvert.ToInt32(result);
}///
///16进制转十进制 具体参考十六进制的数值///
///
///
public static int GetValue(ListAry)
{double result = 0;var cm = 0;
cm=Ary.Count;foreach (var item inAry)
{if (cm - 1 == 0)
{
result+=item;
}else{
result+= item * Math.Pow(16, (cm * 2 - 2));
cm--;
}
}returnConvert.ToInt32(result);
}///
///16进制转十进制///
///
///
public static int GetValue(IEnumerableAry)
{double result = 0;var cm = 0;
cm=Ary.Count();foreach (var item inAry)
{if (cm - 1 == 0)
{
result+=item;
}else{
result+= item * Math.Pow(16, (cm * 2 - 2));
cm--;
}
}returnConvert.ToInt32(result);
}#endregion
#region 16进制转十进制 低字节在前
///
///16进制转十进制 高字节在前///
///
///
public static int GetValueLH(ListAry)
{
Ary.Reverse();double result = 0;var cm = 0;
cm=Ary.Count;foreach (var item inAry)
{if (cm - 1 == 0)
{
result+=item;
}else{
result+= item * Math.Pow(16, (cm * 2 - 2));
cm--;
}
}returnConvert.ToInt32(result);
}///
///低字节在前///
///
///
public static int GetValueLH(IEnumerableAry)
{
Ary.Reverse();double result = 0;var cm = 0;
cm=Ary.Count();foreach (var item inAry)
{if (cm - 1 == 0)
{
result+=item;
}else{
result+= item * Math.Pow(16, (cm * 2 - 2));
cm--;
}
}returnConvert.ToInt32(result);
}///
///16进制转十进制 低字节在前///
///
///
public static int GetValueLH(ListAry)
{
Ary.Reverse();double result = 0;var cm = 0;
cm=Ary.Count;foreach (var item inAry)
{if (cm - 1 == 0)
{
result+=item;
}else{
result+= item * Math.Pow(16, (cm * 2 - 2));
cm--;
}
}returnConvert.ToInt32(result);
}///
///16进制转十进制 低字节在前///
///
///
public static int GetValueLH(IEnumerableAry)
{
Ary.Reverse();double result = 0;var cm = 0;
cm=Ary.Count();foreach (var item inAry)
{if (cm - 1 == 0)
{
result+=item;
}else{
result+= item * Math.Pow(16, (cm * 2 - 2));
cm--;
}
}returnConvert.ToInt32(result);
}#endregion
#endregion