public static long ushortTolong(ushort pre48, ushort pre32, ushort pre16, ushort pre0) { ulong rt = 0; ulong temp = 0; temp = pre48; rt = temp << 48; temp = pre32; temp = temp << 32; rt = rt | temp; temp = pre16; temp = temp << 16; rt = rt | temp; temp = pre0; rt = rt | temp; return (long)(rt >> 1); } public static int ushortToint(ushort pre16, ushort pre0) { uint rt = 0; uint temp = 0; temp = pre16; temp = temp << 16; rt = rt | temp; temp = pre0; rt = rt | temp; return (int)(rt >> 1); }