protected static int GetByteArray(byte[] Data, ref byte[] Value, int Pos, int ArrayLength) { UInt16 RealLenght = 0; GetUInt16(Data, ref RealLenght, Pos); Value = new byte[RealLenght]; Array.Copy(Data, Pos + 2, Value, 0, RealLenght); return Pos + RealLenght + 2; }