Bauglir.Ex.WebSocketConnection.ReverseBytes C# (CSharp) Method

ReverseBytes() protected static method

protected static ReverseBytes ( byte inArray ) : byte[]
inArray byte
return byte[]
        protected static byte[] ReverseBytes(byte[] inArray)
        {
            byte temp;
            int highCtr = inArray.Length - 1;

            for (int ctr = 0; ctr < inArray.Length / 2; ctr++)
            {
                temp = inArray[ctr];
                inArray[ctr] = inArray[highCtr];
                inArray[highCtr] = temp;
                highCtr -= 1;
            }
            return inArray;
        }