public new int CompareTo(object obj)
        {
            if (obj == null || obj.GetType() != GetType())
            {
                return(-1);
            }

            Dozent dozent          = (Dozent)obj;
            int    personEqualRate = base.CompareTo(obj);

            switch (personEqualRate)
            {
            case 0:
                return(Abschluss.CompareTo(dozent.Abschluss));

            default:
                return(personEqualRate);
            }
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (ReferenceEquals(obj, this))
            {
                return(true);
            }

            if (obj.GetType() != GetType())
            {
                return(false);
            }

            Dozent dozent = (Dozent)obj;

            return(base.Equals(dozent) &&
                   Abschluss.Equals(dozent.Abschluss));
        }
示例#3
0
 public void Remove(Dozent dozent)
 {
     KursDozentListe = new KursDozentListe(KursDozentListe.Where(x => !x.Dozent.Equals(dozent)).ToList());
 }
示例#4
0
 public KursDozent(Kurs kurs, Dozent dozent)
 {
     Kurs   = kurs;
     Dozent = dozent;
 }