You can instantiate ConsoleKeyInfo
structure using parameterized constructor
ConsoleKeyInfo key;
if(read_mode)
{
key = Console.ReadKey(true);
}
else
{
key = new ConsoleKeyInfo((char)ConsoleKey.Enter, ConsoleKey.Enter, false, false, false);
}
...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…