title: How to write extension methods for anonymous types?
body: <p>I'm trying to create a CSV extension method for my enumerable list and I'm stumped.  Here's how I created my simple enumerated list:</p>
  
  <pre><code>var CAquery = from temp in CAtemp
   join casect in CAdb.sectors
   on temp.sector_code equals casect.sector_code
   select new
   {       
       CUSIP = temp.equity_cusip,
       CompName = temp.company_name,
       Exchange = temp.primary_exchange       
   };
  
  CAquery.WriteToCSVFile();
  </code></pre>
  
  <p>This is what I have done so far in creating an extension method (which I think is wrong):</p>
  
  <pre><code>public static class CSVExtensions
  {        
      public static void WriteToCSVFile(this IEnumerable&lt;T&gt; myList)
      {
  </code></pre>
  
  <p>Do you see what I'm doing wrong?</p>