我想在Visual Studio 2008中调试一个程序.问题是如果它没有得到参数就会退出.这是从主要方法:
if (args == null || args.Length != 2 || args[0].ToUpper().Trim() != "RM")
{
Console.WriteLine("RM must be executed by the RSM.");
Console.WriteLine("Press any key to exit program...");
Console.Read();
Environment.Exit(-1);
}
Run Code Online (Sandbox Code Playgroud)
我不想评论它,然后在编译时再回来.如何在调试时使用参数启动程序?它被设置为StartUp项目.