如何重新启动控制台应用程序? [英] How restart the Console app?

查看:105
本文介绍了如何重新启动控制台应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户按下 R键时,我需要重新启动应用程序控制台。

I need to restart the app Console when the user press "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后运行所需的方法即可。无需重新启动。

I don't think you really need restart whole app. Just run required method(s) after pressing R. No need to restart.

这篇关于如何重新启动控制台应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆