最佳答案
我想在 VisualStudio2008中调试一个程序。问题是如果没有参数,它就会退出。这来自于主要的方法:
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);
}
I don't want to comment it out and and then back in when compiling. How can I start the program with arguments when debugging? It is set as the StartUp Project.