using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace JY.Inspection.Common { public static class ByteUtil { public static byte[] ByteReverse(this byte[] Arrbyte) { byte[] ArrByte = Arrbyte.Select((x, i) => new { x, i }).GroupBy(x => x.i / 2).SelectMany(x => new byte[] { x.Last().x, x.First().x }).ToArray(); return ArrByte; } } }