本文整理汇总了C#中School.AddSchoolClass方法的典型用法代码示例。如果您正苦于以下问题:C# School.AddSchoolClass方法的具体用法?C# School.AddSchoolClass怎么用?C# School.AddSchoolClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类School
的用法示例。
在下文中一共展示了School.AddSchoolClass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
static void Main()
{
// == Disciplines ==
Discipline math = new Discipline("Math", 23, 23);
Discipline bio = new Discipline("Bio", 23, 34);
Discipline geo = new Discipline("Geo", 27, 44);
// == Teachers ==
Teacher Dimitar = new Teacher("Dimitar Lilov", 34, Gender.Male);
Dimitar.AddDiscipline(math);
Dimitar.AddDiscipline(bio);
Teacher Kiril = new Teacher("Kiril Nikolov", 29, Gender.Male);
Kiril.AddDiscipline(geo);
// == Students ==
Student Aneliq = new Student("Aneliq Iordanova", 17, Gender.Female, 000354);
Student Yoana = new Student("Yoana Ivanova", 18, Gender.Female, 000359);
Yoana.AddComment("EGN - 2342623623");
// == List Of Teachers ==
List<Teacher> teachers = new List<Teacher>();
teachers.Add(Dimitar);
teachers.Add(Kiril);
// == List Of Students ==
List<Student> students = new List<Student>();
students.Add(Aneliq);
students.Add(Yoana);
// == StudentClass ==
StudentClass firstClass = new StudentClass("10B", students, teachers);
// == School ==
School washington = new School("Washington");
washington.AddSchoolClass(firstClass);
// == Printing ==
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("Printing School ...");
Console.ResetColor();
Console.WriteLine();
Console.WriteLine(washington);
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("Printing Class ...");
Console.ResetColor();
Console.WriteLine();
Console.WriteLine(firstClass);
Console.ReadLine();
}