title: How to replace normal foreach to linq ForEach?
body: <pre><code>public static List&lt;TDuplicate&gt; ValidateColumnInList&lt;TItem, TDuplicate&gt;(List&lt;TDuplicate&gt; DuplicateExpression) where TDuplicate : DuplicateExpression
  {
      List&lt;TDuplicate&gt; TempDuplicateExpression = new List&lt;TDuplicate&gt;();
      var itemProperties = typeof(TItem).GetProperties();
      foreach (var DplExpression in DuplicateExpression)
      {
          bool IsContainColumn = itemProperties.Any(column =&gt; column.Name == DplExpression.ExpressionName);
          if (!IsContainColumn)
          {
              TempDuplicateExpression.Add(DplExpression);
          }
      }
      return TempDuplicateExpression;
  }
  </code></pre>
  
  <p>In the above section how to replace above <code>foreach</code> to linq <code>ForEach</code>.</p>