本文整理汇总了C#中Teacher.AddDisicipline方法的典型用法代码示例。如果您正苦于以下问题:C# Teacher.AddDisicipline方法的具体用法?C# Teacher.AddDisicipline怎么用?C# Teacher.AddDisicipline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Teacher
的用法示例。
在下文中一共展示了Teacher.AddDisicipline方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
public static void Main()
{
Student student1 = new Student("Aaaa Bbb", 1);
Student student2 = new Student("Cccc Ddd", 2);
Student student3 = new Student("Eeee Fff", 3, "ZZZZZZZZZZZZZ");
Teacher teacher1 = new Teacher("Zzzz yyyy");
Teacher teacher2 = new Teacher("Xxxx wwww");
Discipline oop = new Discipline("oop", 12, 10, "AAAAAAAA");
Discipline csharp = new Discipline("Csharp", 20, 14);
Discipline java = new Discipline("Java", 15, 16);
teacher1.AddDisicipline(oop);
teacher1.AddDisicipline(csharp);
teacher2.AddDisicipline(oop);
teacher1.ListOfDisciplines.Add(java);
School mySchool = new School();
ClassInSchool myClass = new ClassInSchool("MyClassName");
myClass.AddStudent(student1);
myClass.AddStudent(student2);
myClass.AddStudent(student3);
myClass.RemoveStudent(student1);
myClass.AddTeacher(teacher1);
myClass.AddTeacher(teacher2);
mySchool.AddClass(myClass);
System.Console.WriteLine(myClass);
}