相关疑难解决方法(0)

调试时如何启动带参数的程序?

我想在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项目.

c# visual-studio-2008 visual-studio visual-studio-debugging

91
推荐指数
4
解决办法
9万
查看次数