var SRMP = new byte[4]; Array.Copy(Encoding.UTF8.GetBytes(1.ToString("x2")), SRMP, Encoding.UTF8.GetBytes(1.ToString("x2")).Length); Array.Copy(Encoding.UTF8.GetBytes((j + 1).ToString("x2")), 0, SRMP, 1, Encoding.UTF8.GetBytes((j + 1).ToString()).Length); ushort leng = 1400; byte[] a = new byte[2]; a[0] = (byte)(leng>>8); a[1] = (byte)leng; var ccc = BitConverter.ToString(a).Replace("-", ""); var dddd = Convert.ToInt32(ccc, 16); Array.Copy(a, 0, SRMP, 2, a.Length);
原文地址:https://www.cnblogs.com/lonelyxmas/p/11100219.html
时间: 2024-10-09 13:27:09