title: Replacing foreach with LINQ query
body: <p>I have the following code in one of my methods:</p>
  
  <pre><code>foreach (var s in vars)
  {
      foreach (var type in statusList)
      {
          if (type.Id == s)
          {
              Add(new NameValuePair(type.Id, type.Text));
              break;
          }
      }
  }
  </code></pre>
  
  <p>This seems sort of ineffective to me, and I was wondering if there was a way to substitute at least one of the foreaches wih a LINQ query. Any suggestions?</p>
  
  <p><b>EDIT:</b> vars is an array of strings and the Add method adds an item to a CSLA NameValueList.</p>