|
-
April 9th, 2010, 09:10 AM
#1
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
Last edited by Frank100; April 9th, 2010 at 09:19 AM.
-
April 9th, 2010, 03:02 PM
#2
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|