C# short类型数据拷贝给ushort类型
方法1:转成bytes数组后再转换过去
short bbb = -1000;
ushort ccc = 0;
byte[] srcbyte = BitConverter.GetBytes(bbb);
ccc=BitConverter.ToUInt16(srcbyte,0);
方法2:直接非托管内存拷贝
ushort[] srcbyte2=new ushort[1];
short[] ffff = new short[1] { -100 };
Buffer.BlockCopy(ffff, 0, srcbyte2, 0, 2);