Files
1440WGJ/JY.Inspection/Common/ByteUtil.cs
T

18 lines
467 B
C#
Raw Normal View History

2026-07-14 13:55:17 +08:00
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;
}
}
}