Marc

Marc

  • NA
  • 205
  • 54.4k

Commandline Args

Oct 2 2014 9:42 AM
I have command line arguments that I am trying to pass an instance too, but am getting the error that the command line arguments takes only 1 argument. Below is an example:
 
static void Main (string[] args)
{
Account acc = new Account();
ThisAccount tAcc = acc.getAccount();
 
Initialize();
}
 
public static void Initialize(string[] args)
{
 
// get arguments
if (!ProCmLine (args))   //This is where intellisense is saying I have the issue
{
 
}
}
 
public static bool ProCmLine (string [] args, ThisAccount tAcc) //added ThisAccount tAcc
{
if ( blahBlah == true)
{
      tAcc.UserId = local;  //want to use it here
}
}
 
Thanks

Answers (3)