title: Searching a list using an array as the parameter list using LINQ
body: <p>I currently have some code that looks like this</p>
  
  <pre><code>string[] contains = new string[]{"marge", "homer", "lisa", "bart", "maggie"};
  string[] actions = new string[]{"get dye", "mmm beer", "blow saxophone", "have a cow", "bang"};
  
  for (int i = 0; i &lt; someActions.Count; ++i)
  {
    if (someActions.Contains(contains[i]))
      callRoutine(actions[i]);
  }
  </code></pre>
  
  <p>(this is a very trivial example - someActions is a List)</p>
  
  <p>I'm wondering if there is a way in LINQ to do the same as loop? I'm thinking of something along the lines of </p>
  
  <pre><code>int i = position in contains or 0
  callRoutine(actions[i]);
  </code></pre>
  
  <p>The problem is that I don't know how to use an array as the search parameter. Various searches suggest I need to use IEnumerable to do this, but I'm not sure.</p>
  
  <p>Any help would be appreciated here.</p>
  
  <p>Paul</p>