I'm trying to read in a text file from the command prompt in C#, via
program.exe < textfile.txt
However, I cannot find the correct way to do this.
So far, I've only been able to pass the path and the filename to string [] args and then opening the file with the StreamReader class. While this is an acceptable alternative, I've been told that the method with "<", which I suppose is a redirection of standard input, offers advantages like not requiring file handling.
Can anyone give some insight into this?
edit: Program.exe is my C# application.