Thank you very much...
I run the program; when I initially press (R+Ctrl) or (B+Ctrl), then the pressed key(s) are only Console.ReadKey (true)'ed as you can see on the sixth code line in the above code.
How to make that specific [Console.ReadKey (true)] on the 6th line to execute only if the the statement is false.
User Profile
Collapse
-
How to Read a Specific Line from A Text File?
Hi, I'm writing a console program in order to make my own keyboard shortcuts.
...Code:ConsoleKeyInfo input; do { if (File.Exists("info.txt") == true) ; else Console.WriteLine("File not found! \nPress any key to try again..."); Console.ReadKey(true); } while (File.Exists("info.txt") == false); StreamReader reader = new StreamReader("info.txt");
No activity results to display
Show More
Leave a comment: