BonCodeAJP13Namespace.BonCodeAJP13Packet.GetInt32 C# (CSharp) Метод

GetInt32() защищенный статический Метод

Get the Int32 value from the array starting from the position Pos
protected static GetInt32 ( byte Data, Int32 &Value, int Pos ) : int
Data byte
Value System.Int32
Pos int
Результат int
        protected static int GetInt32(byte[] Data, ref Int32 Value, int Pos)
        {
            byte[] ValueData = new byte[sizeof(Int32)];
            Array.Copy(Data, Pos, ValueData, 0, sizeof(Int32));

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