public Command getCommand() { string inputLine = ""; inputLine = Console.ReadLine(); String[] values = inputLine.Split(' ', '\n'); if (CommandWords.isCommand(values[0])) { if (values.Count() == 1) { return new Command { CommandWord = values[0], SecondWord = null } } } ;
public Command GetCommand() //gets the use of the command to know how many words are needed { string inputLine = "> "; // allows input from the user inputLine = Console.ReadLine(); inputLine.ToLower(); String[] values = inputLine.Split(' ', '\n'); if (CommandWords.IsCommand(values[0])) { if (values.Count() == 1) //counts how many words have been typed { return new Command { CommandWord = values[0], SecondWord = null } } } ; //shows the second word as null as it wont be needed