Link to home
Start Free TrialLog in
Avatar of ube100
ube100Flag for United Kingdom of Great Britain and Northern Ireland

asked on

command line argument

Hi, Have a look at this Main function in my .Net windows application:

static void Main(string[] args)
        {
            try
            {
                if (args.Length == 2)
                {
                    DDIManager dDIManager;

                    DDIManager.DatabaseServer = args[0].Trim();
                    DDIManager.DatabaseName = args[1].Trim();

                    Logger.Information("Working with database '" +
                        DDIManager.DatabaseServer + "\\" +
                        DDIManager.DatabaseName + "'");

                    dDIManager = new DDIManager();
                    //dDIManager.ProcessReturnedAUDDACInstructions();
                    //dDIManager.ProcessReturnedARUDDInstructions();
                    //dDIManager.ProcessReturnedAUDDISInstructions();
                    dDIManager.ProcessNewDDIs();
                    dDIManager.ProcessAmendedDDIs();
                }
                else
                {
                    Help("Invalid parameters");
                    LogHelp("Invalid parameters");
                }
            }
            catch (Exception exp)
            {
                Logger.Error(exp);
            }
        }
I have been looking into whole solution to find the connection string for this project but found nothing. But by the looks of it this must be paased as a command line argument and, if that is the case where do I find what has been passed?

Is that the location where this executable is running from.
ASKER CERTIFIED SOLUTION
Avatar of himanshut
himanshut
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ube100

ASKER

Helps me in some way.