protected static int SetByteArray(byte[] Data, byte[] Value, int Pos, int ArrayLength) { byte[] LengthArray = new byte[2]; SetUInt16(LengthArray, (UInt16)Value.Length, 0); Array.Copy(LengthArray, 0, Data, Pos, 2); Array.Copy(Value, 0, Data, Pos + 2, Value.Length); return Pos + Value.Length + 2; }