Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

C# StreamWriter Problem

  • 06-03-2007 12:49PM
    #1
    Registered Users, Registered Users 2 Posts: 1,991 ✭✭✭


    I'm trying to write to a command line interface using a streamwriter, just wonder if anyone can tell me how to pass a 'return' or 'enter' command through so that when it writes the passed command to the CLI that it will exicute the command and move onto the next free prompt!??


Comments

  • Closed Accounts Posts: 4,943 ✭✭✭Mutant_Fruit


    streamWriter.WriteLine("ping www.example.com");

    should do the trick. Just make sure you use "writeline" as opposed to "write".


Advertisement