I just created a class of commands, so long as I did, I pulled the command class to the main class but I'm having an error
Command class:
public bool OnCommand(string[] args)
{
if (args.Length > 1)
{
string a;
if ((a = args[1]) != null)
{
if (a == "teste")
{
Console.WriteLine("teste");
return true;
}
}
}
return true;
}
Main Class (I put only one part of the code, I found the other part unnecessary):
public void OnAction(Hashtable parameters)
{
cmd.OnCommand();
}
Note: I have an error in this part: cmd.OnCommand();
says: There is no argument provided that corresponds to the required formal parameter "args"