title: Refactoring - which pattern to use in this example?
body: <p>I have a function which is processing rows from an excel file.In this function,I have a for loop.Now,once a row is extracted,we check for various conditions.If any condition is false,we continue with next row.Can this code be made more structured using a pattern?</p>
  
  <pre><code> foreach (System.Data.DataRow dr in ds.Tables[0].Rows)
                  {
  
                      Product prod = GetProduct(dr);
                      if (prod == null)
                      {
                          IndicateNotInserted(dr, "InvalidProduct");
                          continue; 
                      }
  
  
  
                      if (IsProductExpired())
                      {
                          IndicateNotInserted(dr, "Expired");
                          continue; 
                      }
                      ProcessRow(dr);
  </code></pre>