BonCodeAJP13Namespace.BonCodeAJP13Packet.GetUInt64 C# (CSharp) Method

GetUInt64() protected static method

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

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