Answered step by step
Verified Expert Solution
Question
1 Approved Answer
HHow do I fix this exception? X using System; using System.Collections.Generic; using System.Linq; Exception Unhandled using System.Threading.Tasks; System.Invalid OperationException: 'Cannot read keys when either (using
HHow do I fix this exception?
X using System; using System.Collections.Generic; using System.Linq; Exception Unhandled using System.Threading.Tasks; System.Invalid OperationException: 'Cannot read keys when either (using System.Windows.Forms; application does not have a console or when console input has been redirected from a file. Try Console.Read.' namespace GOLStartUp { O references internal class Program { O references private static void Main(string[] args) { View Details | Copy Details | Start Live Share session... Game game = new Game(); Exception Settings ConsoleKeyInfo keyInfo; while ((keyInfo = Console.ReadKey(true)).Key != ConsoleKey. Escape) { switch (keyInfo.Key) { case ConsoleKey.UpArrow: @Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started