Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Some new stuff I learnt about the Console

It's amazing how often related events seem to occur close to one another. Often I'll be working on a project and I'll need some code to do something I've never done before ( for example, writing an Ftp client ) and on the same day someone will post some cool code which does exactly what I need, or I'll stumble upon an article which does. It happened again this weekend.

First, Steve Smith posted a link on the C# list to an article about Standard I/O and Console Applications. This article was really, really cool. I never knew about any of that stuff - such as standard input/output and how cmd.exe allows you to pipe commands and redirecting standard output to a text file like so:

    C:\ dir >listoffiles.txt

 

So, within 20 minutes of reading that fine article I stumbled across this blog entry by Justin Rogers:

    Using piped output redirection on the Process/ProcessStartInfo classes...

Very neat!

No Comments