title: A local or parameter named 'e' cannot be declared in this scope
body: <p>I'm trying to use this code:</p>
  
  <pre><code>var controls = new[] { txtName, txtIdentityCard, txtMobile1 };
  foreach (var control in controls.Where(e =&gt; String.IsNullOrEmpty(e.Text))) // error here in (e)
  {
      errorProvider1.SetError(control, "Please fill the required field");
  }
  </code></pre>
  
  <p>to check if one of my textboxes is empty, but it gives the following error:</p>
  
  <blockquote>
    <p>A local or parameter named 'e' cannot be declared in this scope
    because that name is used in an enclosing local scope to define a
    local or parameter</p>
  </blockquote>
  
  <p>Any help?</p>