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)); }
public void Remove(Dozent dozent) { KursDozentListe = new KursDozentListe(KursDozentListe.Where(x => !x.Dozent.Equals(dozent)).ToList()); }
public KursDozent(Kurs kurs, Dozent dozent) { Kurs = kurs; Dozent = dozent; }