title: Create an assembly in memory
body: <p>I'd like to create an assembly in memory, using an using the classes in <code>Reflection.Emit</code></p>
  
  <p>Currently, I can create the assembly and get it's bytes using something like</p>
  
  <pre><code>AssemblyBuilder builder =
     AppDomain.CurrentDomain.DefineDynamicAssembly(..., 
        AssemblyBuilderAccess.Save);
  
  ... create the assembly ...
  
  builder.Save(targetFileName);
  
  using(FileStream fs = File.Open(targetFileName, FileMode.Open))
  {
     ... read the bytes from the file stream ...
  }
  </code></pre>
  
  <p>However, it does so by creating a file on the local filesystem.  I don't actually need the file, just the bytes that would be in the file.</p>
  
  <p>Is it possible to create the assembly without writing any files?</p>