BonCodeAJP13Namespace.BonCodeAJP13Packet.SetUInt32 C# (CSharp) Method

SetUInt32() protected static method

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