β Having to press <return> twice?
Is there a reason for why i have to press <return> in the console twice for the program to exit?
3 Replies
It does the Console.WriteLine correctly. and then it waits for input from the user
but i have to press enter twice for the program to go into the if and close the program
I genuinely have no idea why that is the case
What's worse is that i can press Enter then on the next row i can type anything followed by enter and it doesn't enter the if statement at all?!
We dont have the full code, so it's hard to pinpoint the reason.
I suggest to use the debugger and press F10 after .Exit(1).
You can also "break all" to see where the thread is waiting.
Visual Studio open a console that closes when you press enter, that's convenient because it doesn't reopen a console every time. That's maybe one of your return.
Then, you can have events handler that do stuff when your program exit, maybe you plugged in code that does that ?
You can also "break all" to see where the thread is waiting.
Visual Studio open a console that closes when you press enter, that's convenient because it doesn't reopen a console every time. That's maybe one of your return.
Then, you can have events handler that do stuff when your program exit, maybe you plugged in code that does that ?
oh right it might just be Visual Studios own like you mentioned
I'll leave it as it is then :p
thanks !!