using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace XYLEM.Communication.ValueEncoders { static class ArrayManipulator { public static byte[] SwapPairWise(byte[] input) { byte[] swapped = new byte[input.Length]; for (int i = 0; i < input.Length; i = i+2) { swapped[i + 1] = input[i]; swapped[i] = input[i + 1]; } return swapped; } } }