Finally came to giving a try to "MyProgram.exe < TestCase.txt".
You're absolutely right - having the same code for site and VS would be just awesome - I have to change it everytime I copy back and forth.
But I met some issues when I executed my example it reads first line as
While it is just 4 3 when I read it with stream reader.
Solved it now by converting text file to ANSI from UTF-8.
There must be a way to make program read UTF-8, right?
I still cannot make VS to "eat" this parameter.
I set Start Options command line arguments to <1.txt
and when I run it with Debugger attached (F5) - it works fine.
But when I run it without Debugger (Ctrl-F5) - it waits for the input from the console.
I usually run applications without debugger when I don't specifically need it.
So it is inconvenient for me.