0
I created a class only of commands, so far so good, I pulled the class of commands to the main class but I’m with a mistake
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 unnecessary the other part):
public void OnAction(Hashtable parameters)
{
cmd.OnCommand();
}
Note: I’m wrong in this part: cmd.OnCommand();
says: There is no argument provided that matches the required formal parameter "args"
args
from where ? shows the code.– 13dev
friend I’m new in c#, I don’t understand what you said
– Leonardo Araujo