-
Process in C#
Hi,
I am creating a Process in C# and want to print my "strName" value to command prompt.
This code is not printing any value , please let me know the right code.
I know this code is wrong,,but if we pass Arguments then?
string strName = "Alex";
Process pr = new Process();
pr.StartInfo.FileName = "cmd.exe";
pr.Start();
Thanks
-
Re: Process in C#
And why would you expect that to print anything to the console exactly? You start cmd.exe with no parameters and simply declare a string variable in your code. If you wish to print to the Console, print to stdout and redirect it to the console if necessary.