title: RemoveAt() not working c#
body: <p>Even after the <code>RemoveAt()</code> method, my list keeps being the same and I don't even get an error:</p>
  
  <pre><code>foreach (var row in queryCandidates.ToList())
  {
      try
      {
          xString = queryCandidates.ToList().ElementAt(i).District;
          int.TryParse(xString, out xNumber);
  
          temp = xNumber.Equals(districtNumber);
          System.Diagnostics.Debug.Write(temp+ " ");
          System.Diagnostics.Debug.Write(i+" ");
          if (temp == false)
          {
              System.Diagnostics.Debug.WriteLine(" i is:"+i);
  
              //not working even when it should
              queryCandidates.ToList().RemoveAt(i);
  
          }
      }
  
      catch { }
      i++;
      if (last == i)
      {
          System.Diagnostics.Debug.WriteLine("before ending loop: ");
          return View(queryCandidates.ToList());
      }
  }
  
  System.Diagnostics.Debug.WriteLine("after ending the loop: ");
  return View(queryCandidates.ToList());
  </code></pre>