加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – 如何重新启动控制台应用程序?

发布时间:2020-12-15 06:57:49 所属栏目:百科 来源:网络整理
导读:当用户按“R”时,我需要重新启动应用程序控制台. 我有这个 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
当用户按“R”时,我需要重新启动应用程序控制台.

我有这个

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...
}

谢谢

解决方法

我不认为你真的需要重新启动整个应用程序.按R后只需运行所需的方法.无需重新启动.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读