title: how to convert foreach loop into for loop in c#
body: <pre><code>foreach (Process newprcs in oPrcs)
   {
    newprocid = (UInt32)newprcs.Id;
    if (!oNewProcs.Contains(newprocid))  //checking process id contain or not
      {
        oNewProcs.Add(newprocid);
        // MessageBox.Show(newprocid.ToString());
        uIdOfProcess = newprocid;
        //MessageBox.Show(uIdOfProcess.ToString(),"ProcessId");
        CInjector.HookingAPI(uIdOfProcess, "HookPrintAPIs.dll");
      }
  }
  </code></pre>