@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
public static class ConvertHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 字节数组高低位转换
|
||||
/// </summary>
|
||||
/// <param name="Arrbyte"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user