public void Execute(params string[] parameters) { int index; try { string color = parameters[1]; if (!Int32.TryParse(parameters[0], out index)) { Console.WriteLine("Please check the correctness of the index!"); return; } picture.Color(index, color); } catch (Exception e) { Console.WriteLine("{0} Exception caught.", e); } }