title: C# csc compile source code from memory
body: <p>I would like to compile c# <em>source code</em> from a string. I know this is possible using CodeDom, and I would like to know if it's possible to do this using the command line compiler. For example, say I load the following code onto a string:</p>
  
  <pre><code>static void Main(string[] args)
          {           
  
          }
  </code></pre>
  
  <p>Is there some way to compile this code into a c# executable (.exe) file <strong>without</strong> first writing this code to my hard drive in the form of a C# class (.cs) file?</p>
  
  <p>That was the first part of my question. The second part assumes that the above is in fact impossible. Let's say I had three difference classes (loaded onto three separate strings). How would I go about using the Command line compiler to compile each of these three classes into one common executable file? I have found some examples online, but they seem to be very vague, unfortunately.</p>
  
  <p>Any help, or pointers in the right direction is much appreciated.</p>
  
  <p>Thank you,
  Evan</p>