コード例 #1
0
 public void AddClass(string className)
 {
     //check if class name is there
     if (!(TitlesTaught.Contains(className)))
     {
         TitlesTaught.Add(className);
     }
 }
コード例 #2
0
 public void AddClass(string className)
 {
     //check if class name is there
     if (!(TitlesTaught.Contains(className)) && ((TitlesTaught == null) || (TitlesTaught.Count < ClassLimit)))
     {
         TitlesTaught.Add(className);
     }
 }