Getting Error on Readprocessememory on c#
<pre><code>private static int FindPattern(byte[] Pattern)
        {
            Process[] P = Process.GetProcessesByName("example");
            if (P.Length == 0)
            {
                return -1;
            }
            if (modules == exmaple())
            {
                modules = P[0].MainModule.BaseAddress;
            }
            byte[] _Buffer = new byte[268435457];
            var tempVar = 0;
            ReadProcessMemory(P[0].Handle, modules, out _Buffer, _Buffer.Length, ref tempVar);


            int[] sBytes = new int[256];
            int Len = Pattern.Length - 1;
            var Dex = 0;

            for (int i = 255; i &gt;= 0; i--)
            {
                sBytes[i] = Pattern.Length;
            }

            for (int i = Len; i &gt;= 0; i--)
            {
                sBytes[Pattern[i]] = Len;
            }

            while (Dex &lt;= _Buffer.Length - Pattern.Length)
            {
                int i = Len;
                while (_Buffer[Dex + i] == Pattern[i])
                {
                    if (i == 0)
                    {
                        return Dex;
                    }
                    i -= 1;
                }
                Dex += sBytes[_Buffer[Dex + Len]];
            }

            return -1;
        }
</code></pre>

<p>i tried a lot but i can't fix it.What did i did wrong?.
i am getting errors on this.Can anyone fix it for me please :</p>

<pre><code>ReadProcessMemory(P[0].Handle, modules, out _Buffer, _Buffer.Length, ref tempVar);
</code></pre>