title: C# ToList performance and alternative ways
body: <p>I have a big dictionary and a list (myList). I want to keep the items in myList only if there is an item in my dictionary with the same Title. The problem is that the initialisation of titleList takes long time (2-3 sec). Is there any better way to do that?</p>
  
  <pre><code>var dictionary = r.MyFunction.Where(a condition);
  var titleList = dictionary.Select(x =&gt; x.Value.Title).ToList()
  
  myList = productsTemp.Where(x =&gt; titleList.Contains(x.Title)).ToList();
  </code></pre>