简体   繁体   中英

Child Process VB.NET

My aim is to create a child processes which will execute in parallel the piece of VB.NET code say a function. I want to do it specifically using processes and not threads. Please suggest the ways to do this?

You may take a look at the Process.Start method. Obviously the piece of code you would like to be executed in a separate process should reside in this process. It cannot reside in the caller process.

Another possibility is to create a new AppDomain instead of process.

Your best option is to use the Process class with the Start method.

Check the ProcessStartInfo class to see what you options you can use to start a process.

However, the process will be separate - you will not have control over it and it cannot be a "sub-process". If you need more control, you should reconsider using threads.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM