title: Methods and Anonymous Types
body: <p>I know that you cannot return anonymous types from methods but I am wondering how the Select extension method returns an anonymous type. Is it just a compiler trick?</p>
  
  <p>Edit</p>
  
  <p>Suppose L is a List. How does this work?</p>
  
  <pre><code>L.Select(s =&gt; new { Name = s })
  </code></pre>
  
  <p>The return type is IEnumerable&lt;'a> where 'a = new {String Name}</p>