BonCodeAJP13Namespace.BonCodeAJP13Packet.GetInt64 C# (CSharp) Method

GetInt64() protected static method

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

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