public void AddClass(string className) { //check if class name is there if (!(TitlesTaught.Contains(className))) { TitlesTaught.Add(className); } }
public void AddClass(string className) { //check if class name is there if (!(TitlesTaught.Contains(className)) && ((TitlesTaught == null) || (TitlesTaught.Count < ClassLimit))) { TitlesTaught.Add(className); } }