So this might be an odd question, but I have a C# program that runs from the console, and everything works fine for the most part now except one thing.
Within my program, I have a section of code like...
loadFile();
foreach(var x in imgSet)
{
//do whatever
}
The problem I have is that I want my entire program to be automated and run using task scheduler, I want no human interaction. And the program calls the loadFile()
method just fine within the console, but after it writes out the output from that method, the user must press enter to go into that foreach loop. I do not quite know why this is and was wondering if there is a way to by-pass that and make it entirely automated?
If it's a console program, loadFile()
may call Console.ReadKey()
or Console.ReadLine()
If you can change the code for the loadFile()
method, you might be able to add a parameter or an overload that will skip over any unnecessary input from the user.