Ohh. Thanks a lot man! I didn't even realize that it would have any affect on the line. Great Job! Would give best answer, but there was no recommendation on how to fix. Thanks anyways!
EDIT: Using Rabbit's tip I could find a way to fix (was tricky though) so might as well give best answer honestly. I guess not all best tips have to explicitly explain the solution, but have some hint that allows the user to come up with their own so...
User Profile
Collapse
-
Themantimes8 started a topic How can I clear the buffer between Console.ReadLine() inputs (do-while input)in C SharpHow can I clear the buffer between Console.ReadLine() inputs (do-while input)
I am making a game that requires input to be taken until the user inputs "exit" to the console. That part is taken care of with a simple do-while loop where i ask for user input:
Now here is the problem: When...Code:do { string input = Console.ReadLine(); game.getInput(input); //input validation (disregard) } while (Console.ReadLine().ToLower() != "exit");
No activity results to display
Show More
Leave a comment: