예제 #1
0
파일: Form1.cs 프로젝트: AnnaAfanasieva/lb2
        public Form1()
        {
            InitializeComponent();
            universities = new List <University>();

            universities.Add(new University(3, 8, 100, 12, "ХНУРЭ", 10, 7));

            universities.Add(new University(3, 8, 100, 12, "ХПИ", 10, 7));

            University khai = new University(new University(3, 8, 100, 12, "ХАИ", 10, 7));

            universities.Add(khai);

            University khnpu = new University(khai);

            khnpu.univname = "ХНПУ";
            universities.Add(khnpu);

            initCombo();
        }
예제 #2
0
        public static University operator +(University firstuniv, University seconduniv)
        {
            University result = new University(firstuniv.faculty + seconduniv.faculty, firstuniv.laboratory + seconduniv.laboratory, firstuniv.students + seconduniv.students, firstuniv.rooms + seconduniv.rooms, firstuniv.univname + '+' + seconduniv.univname, firstuniv.teachers + seconduniv.teachers, firstuniv.assistant + seconduniv.assistant);

            return(result);
        }