public void MarkTaskAsDone(int taskID) { Task task = _tasks[taskID] as Task; if (null == task) { throw new ArgumentException("Task not found!", "taskID"); } task.SetDone(); }