Question How do I read what user writes in the console (before hitting enter)?

LegitMeme

Member
Joined
May 5, 2019
Messages
13
Programming Experience
Beginner
I am trying to make the color of text change when the user inputs a certain word in the console (before they hit enter) so it'll come out a certain color, I searched on google and saw no one has an answer.

Is there any way to do this?

C#:
            if ('input text before enter' == "Exit") {
                Console.ForegroundColor = ConsoleColor.Red;
            }
 
Back
Top Bottom