title: C# How to know which elements of a list are substrings of a string?
body: <p>If I have a list of string like</p>
  <pre><code>var MyList = new List&lt;string&gt;
  {
      &quot;substring1&quot;, &quot;substring2&quot;, &quot;substring3&quot;, &quot;substring4&quot;, &quot;substring5&quot;
  };
  </code></pre>
  <p>is there any efficient way to determine which elements of that list are contained in the following string</p>
  <p>&quot;substring1 is the substring2 document that was processed electronically&quot;</p>
  <p>In this case the result should be</p>
  <pre><code>var MySubList = new List&lt;string&gt;
  {
      &quot;substring1&quot;, &quot;substring2&quot;
  };
  </code></pre>