title: .NET Do lambdas prevent garbage collection of external references used in them?
body: <p>Here is an example:</p>
  
  <pre class="lang-cs prettyprint-override"><code>var task = Task.Run();
  var func = () =&gt; task.Result;
  </code></pre>
  
  <p>So if I loose the task reference and keep the func reference is GC going to collect the task and make the func throw null reference exception?</p>