简体   繁体   中英

How to run console app on other windows form project

Hi i have a existing console app in c# and win form project on the same solution

Is there a way to run the console app on my winform providing the readkey needed on the console app from the textbox on my win form Sorry for my bad english

Yes, of course it is possible

Check Process.Start() on MSDN

https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.start?redirectedfrom=MSDN&view=netframework-4.8#System_Diagnostics_Process_Start_System_String_System_String_

Just start the process and pass your textbox value as argument

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