title: Looping through a datatable and remove row
body: <p>I have populated a Datatable, from 2 different servers.  I am able to make adjustments where my length>0, what I want to do is remove the rows that does not hit.  Here is a summary of what I have</p>
  
  <pre><code>DataRow[] dr = payments.dtPayments.Select(myselect);
  
  if (dr.Length &gt; 0)
  {
     for (int a = 0; a &lt; dr.Length; a++)
     {
        if (thisOption == true)
           dr[0].Delete();
        else if (otherOption == true)
        {
           dr[0]["Date"] = myDataReader["date"].ToString().Trim();
           dr[0]["Pay"] = payTypeName(myDataReader["ccdsrc"].ToString()
                                                            .Trim());
        }
     }
  }
  if (dr.Length == 0)
  {                        
     if (LastOption == true)
     {
       //DataRow should be removed
     }                        
  }
  </code></pre>