我已经创建了一个小项目。这里是:如何从课堂脱身
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")
{
}
}
}
当用户键入退出。我想让我的程序退出。谁能帮助我,请
可能的重复[如何指定.NET中的控制台应用程序的退出代码?](http://stackoverflow.com/questions/155610/how-do-i-specify-the-exit-code-控制台在网络中的应用) – AntiTcb
程序将在主方法结束时自动存在。你不需要做任何事情。 –
只是从'主' – Sean