I know I can spawn new process using compiled exe file.
Suppose I have a class with a method in my app which I want to be run in the separate process.
Can I compile this method into separate assembly in run-time and spawn process running this newly created file?
Sure... look at CSharpCodeProvider
that can read and compile code to eg an .exe file
http://msdn.microsoft.com/en-us/library/microsoft.csharp.csharpcodeprovider.aspx
Why not just run in its own App Domain. Gives process like separation.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.