【发布时间】:2019-01-17 05:13:32
【问题描述】:
基本上,在我的代码中,我希望它在用户按键后显示下一行。我以为它是ReadKey,但在我按下一个键后它就关闭了。
举例
WriteLine("Press any key to display invoice...");
ReadKey(); //this part
WriteLine("***************************");
WriteLine("*** Corporation ***");
WriteLine("Customer Invoice \r\n");
WriteLine("SHIP TO: ");
【问题讨论】:
-
您可能需要在末尾添加另一个
Console.ReadKey()语句以防止控制台窗口关闭 -
卫生署!谢谢。
标签: c# console.writeline readkey