当用户按“R”时,我需要重新启动应用程序控制台.
我有这个@H_502_3@
Console.WriteLine(message,"Rebuild Log Files" + " Press Enter to finish,or R to restar the program..."); string restar = Console.ReadLine(); if(restar.ToUpper() == "R") { //here the code to restart the console... }
谢谢@H_502_3@
解决方法
我不认为你真的需要重新启动整个应用程序.按R后只需运行所需的方法.无需重新启动.