I'm working on a console application with a lot of command line argument. I can set them for debug in project properties, but couldn't find the way to do so for case "start without debugging". Is there any solution to this in visual studio 2012?
asked Apr 17, 2014 at 11:32
Mehraban
3,3625 gold badges41 silver badges63 bronze badges
1 Answer 1
You can use directives to achieve it, like :
static void Main(string[] args)
{
#if DEBUG
args = new[] { "A" };
#endif
Console.WriteLine(args[0]);
}
answered Apr 17, 2014 at 11:55
kelsier
4,1085 gold badges37 silver badges52 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
Explore related questions
See similar questions with these tags.