I have a solution that reads the command line for a file name and read its contents. I just realized that it would be neat if i could go
c:\MyReader.exe < text.txt
instead of
c:\MyReader.exe text.txt
if the contents of the file got placed as the args input in Main(String[] args). Is it doable or will i have to parse the file anyway?
This wouldn’t put the contents into
args, but rather redirect it to standard input so theConsole.Readmethods would read from the file instead of the keyboard.