BonCodeAJP13Namespace.BonCodeAJP13Packet.SetInt32 C# (CSharp) Method

SetInt32() protected static method

Set the Int32 value in the array starting from the position Pos
protected static SetInt32 ( byte Data, Int32 Value, int Pos ) : int
Data byte
Value System.Int32
Pos int
return int
        protected static int SetInt32(byte[] Data, Int32 Value, int Pos)
        {
            byte[] ValueData = new byte[sizeof(Int32)];
            ValueData = BitConverter.GetBytes(Value);
            // flipping the Array ....Big Endian ..
            ValueData = FlipArray(ValueData);
            Array.Copy(ValueData, 0, Data, Pos, ValueData.Length);
            return Pos + sizeof(Int32);
        }