title: Load and run .exe file or CompilerResults to memory?
body: <p>Is it possible to load <code>CSC CompilerResults</code> into memory instead making <code>.exe</code> file of it?</p>
  
  <p>My code for compilation and execution look like this (shorten version):</p>
  
  <pre><code>        var provider = new CSharpCodeProvider();
  
          var parameters = new CompilerParameters
          {
              GenerateExecutable = true,
              OutputAssembly = exeName,
              GenerateInMemory = false,
              TreatWarningsAsErrors = false
          };
  
          var compiler = provider.CompileAssemblyFromSource(parameters, code);
          private Process process = new Process();
  
          // set parameters of process like filename, use shell execute etc
  
          process.Start();
  
          // do stuff with it like StandardInput.Writeline or StandardOutput.ReadToEnd
  
          process.WaitForExit();
  
          // deleting executed .exe file:
  
          FileInfo file = new FileInfo(process.StartInfo.FileName);
          file.Delete();
  </code></pre>
  
  <p>My question is it any easy way to load compiled code to memory and execute it from memory instead of making <code>.exe</code> file, start it as <code>Process</code> and then deleting that <code>.exe</code>?</p>