How can I run a console application in C#, passing parameters to it, and get the result of the application in Unicode? Console.WriteLine
is used in the console application.
Important point is write Unicode in Console Application.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Check out
Process.Start()
:MSDN - Process.Start Method
Your code will probably look something like:
If by "result of the console application" you mean any output of the program to the console while it runs...you'll need to look at the documentation and figure out how to redirect the output of the program from the console to another stream.
try with below code, here "Amay" is a argument.
Here http://www.aspcode.net/ProcessStart-and-redirect-standard-output.aspx You can see how to read the output from the console app You start with Process.Start().
Sample from MSDN
You should be careful depending upon your use some of the other examples can have issues. For common mistakes made writing your own code, read "How to use System.Diagnostics.Process correctly"
For a library to use, there is one here: http://csharptest.net/browse/src/Library/Processes with a brief usage guide: "Using the ProcessRunner class"
Take a look at the Process class. You can call any executable using Process.Start("myexe.exe");