Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
 public void Remove(Dozent dozent)
 {
     KursDozentListe = new KursDozentListe(KursDozentListe.Where(x => !x.Dozent.Equals(dozent)).ToList());
 }
Exemplo n.º 4
0
 public KursDozent(Kurs kurs, Dozent dozent)
 {
     Kurs   = kurs;
     Dozent = dozent;
 }