BonCodeAJP13Namespace.BonCodeAJP13Packet.GetUInt32 C# (CSharp) Method

GetUInt32() protected static method

Get the UInt32 value from the array starting from the position Pos
protected static GetUInt32 ( byte Data, UInt32 &Value, int Pos ) : int
Data byte
Value System.UInt32
Pos int
return int
        protected static int GetUInt32(byte[] Data, ref UInt32 Value, int Pos)
        {
            byte[] ValueData = new byte[sizeof(UInt32)];
            Array.Copy(Data, Pos, ValueData, 0, sizeof(UInt32));

            // flipping the Array .... Big Endian ..
            ValueData = FlipArray(ValueData);
            Value = BitConverter.ToUInt32(ValueData, 0);
            return Pos + sizeof(UInt32);
        }