private static bool _ParseNeighbourhoodNew(string[] commandParts, Neighbourhood neighbourhood) { string vector = commandParts[1]; if (vector.Equals("plot")) { string plotName = commandParts[2]; if (!Int32.TryParse(commandParts[3], out int size)) { return(false); } // delegate printing to function. In fact, why not delegate whenever possible? No need to keep track of pesky return values neighbourhood.CreatePlot(plotName, size); return(true); } else if (vector.Equals("family")) { string familyName = commandParts[2]; neighbourhood.CreateFamily(familyName); return(true); } return(false); }