title: Filter a List of string in c#
body: <p>I have a list of strings</p>
  <pre><code>List&lt;string&gt; str = new List&lt;string&gt;
  str.Add(&quot;test1&quot;);
  str.Add(&quot;test2&quot;);
  str.Add(&quot;test3&quot;);
  </code></pre>
  <p>After some processing this list goes to some service where the list gets modified and can have any of the three values &quot;test1&quot;,&quot; test2&quot;, &quot;test3&quot; or all of them.</p>
  <p>I want to <strong>filter</strong> this list based on the strings: &quot;test1&quot;,&quot; test2&quot;, &quot;test3&quot; and dump it into some another object.</p>
  <p>How do I filter it without giving hardcoded string values?</p>
  <p>How do I do it in C# using Linq?</p>