title: How to filter list of string lists using string list
body: <p>I have a dataview which is filled by an object using string lists. I want pick the suitable entries by typing search words in a textbox.</p>
  
  <p>my object:</p>
  
  <pre><code>class my_object
  {
      List&lt;string&gt; column1 = new List&lt;string&gt;();
      List&lt;string&gt; column2 = new List&lt;string&gt;();
      List&lt;string&gt; column3 = new List&lt;string&gt;();
      List&lt;string&gt; column4 = new List&lt;string&gt;(); 
  }
  </code></pre>
  
  <p>my entries for the dataview:</p>
  
  <pre><code>List&lt;my_object&gt; entries = new List&lt;my_object&gt;();
  </code></pre>
  
  <p>My aim is to filter the entries like the search function in the windows explorer but with the difference that i want to include four columns an not just the column with the filename.
  Is there any possibility to do this?</p>
  
  <p>What I have tried:</p>
  
  <pre><code>internal static List&lt;my_object&gt; SearchObject(this List&lt;my_object&gt; Source, List&lt;string&gt; SearchWords)
  {
      List&lt;my_object&gt; results = new List&lt;my_object&gt;();
  
      foreach (my_object m in Source)
      {
          foreach(string s in SearchWords)
          {
              // Filter Column 1
              foreach(string c1 in m.column1)
              {
                  if(c1.IndexOf(s) != -1)
                  {
                      results.Add(m);
                      break;
                  }
              }
          } 
      }
  
      return results;
  
      // Problem:
      // This function only filters the first column.
      // If I want to filter the next column, I have to break all 'foreach' blocks 
      // except the '(my_object m in Source)' block...
  
      // It the 'break' would work for more the one loop, this method would work...
  }
  </code></pre>
  
  <p>Hope you can help me.</p>