I have a program that calls a Filewatcher function, like this
Main()
{
watch();
console.Readkey();
}
I have the console.readkey at the end because I don't want the console to display 'Press any key to continue' while the file is being watched for changes. Now, if a change is detected, another function gets triggered off, which does its thing, and eventually calls main again, which once again stops at console.readkey.
At this point, I am experiencing some weird problems like the program requires two key inputs to continue. I'm guessing thats because the console.readkey from before is still waiting for an input, so the first input goes there, and then the second input goes to the second console.readkey.
So, my question is, the first time when the filewatcher gets triggered, can i, via code, feed something to the console.readkey, thats waiting for a user input?