小编Jho*_*hon的帖子

如何离开课堂

我创建了一个小项目.这是它:

class Program
{
   public static void Main()
    {
        Console.WriteLine("Welcome");
        Console.WriteLine("1 to go to Data Files ");
        Console.WriteLine("type quit to exit");
        string input = Console.ReadLine();
        if (input == "1")
        {
            Data go = new Data();
        }
        else if (input == "quit")
        {

        }
    }
}
Run Code Online (Sandbox Code Playgroud)

当用户输入quit时.我希望我的程序退出.请帮助我的人

c#

-1
推荐指数
1
解决办法
95
查看次数

标签 统计

c# ×1