如C# Int32类型取高、低16位:Int32 num = 132073; int low = num & 0xffff; int high = num >> 16;
那如何将高、低16位low和high转成num。
1.如何互转?
2.希望给个链接关于c#高低位的
private static int TwoShortConvInt(short low16Bit,short high16Bit)
{
return (high16Bit<<16) + low16Bit;
}
private static void IntConvTwoShort(int num,ref short low16Bit, ref short high16Bit)
{
high16Bit =(short)( num >> 16);
low16Bit = (short)(num &short.MaxValue);
}
总结了一下
c#位运算实际运用
https://www.cnblogs.com/zhangmumu/p/10793689.html
c#位运算实际运用
https://www.cnblogs.com/zhangmumu/p/10781201.html
Convert.ToInt32();
Convert.ToInt16();
Convert.ToInt64();
https://zzk.cnblogs.com/s/blogpost?w=Int32%20Int16%20Int64%20C%23
不是这样的,位操作,已经解决了