How to create a program (Parent Program) that creates .cs(generate source code programatically from a Parent Program) file and compile it and execute after successfull compilation and communicate result with Parent program.
What i done is
Step 1: i can create file using c# application using System.IO namespace
Step 2: there is option that we can compile program by command line using "csc" from console can execute it by using Prosess.Start() in System.Globalization namespace
But the Problems are
how to know it's compiled properly.
how to communicate Parent program with generated program
Take a look at System.Reflection.Emit - that allows you to generate MSIL assemblies at runtime. Here are two starting points:
http://msdn.microsoft.com/en-us/library/system.reflection.emit.aspx