Passing command line arguments to exe coded in C#

Mobalak88's Avatar, Join Date: Mar 2011
Newbie Member
Hi all,

I am using both the forms and command line arguments in my C# project. The progra must execute in this way :

If the command line arguments are given by the user, the exe must consider that as the input and process. Else it should display the form to the user for the input.

It is working fine if it is executed in the visual studio but if we ompile and create the exe with the command line args, it is taking those input as the default and processing with out considering the user input. If compliled with out the arguments, it is displaying the form.

I hope some one would have a solution. Please post your replies as soon as possible since it is urgent.

Thanks in advance

Regards,

Mobalak88
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
How are you passing the command line input to the final compiled exe?
0
Mobalak88's Avatar, Join Date: Mar 2011
Newbie Member
I have a seperate class commandLineParser defined which reads the command line arguments from the main and parses them.
0
Mobalak88's Avatar, Join Date: Mar 2011
Newbie Member
in DOS, i will set the path, then


filename.exe -darg1 -farg2 etc.