c# - How do I start a program with arguments when debugging? -
i want debug program in visual studio 2008. problem exits if doesn't arguments. main method:
if (args == null || args.length != 2 || args[0].toupper().trim() != "rm") { console.writeline("rm must executed rsm."); console.writeline("press key exit program..."); console.read(); environment.exit(-1); }
i don't want comment out , and in when compiling. how can start program arguments when debugging? set startup project.
go project-><projectname> properties
. click on debug
tab, , fill in arguments in textbox called command line arguments
.
Comments
Post a Comment