public int CompareTo(Contact other) { if (Nom.CompareTo(other.Nom) == 0) { return(Prénom.CompareTo(other.Prénom)); } else if (Nom.CompareTo(other.Nom) == 0 && Prénom.CompareTo(other.Prénom) == 0) { return(dateNaissance.CompareTo(other.dateNaissance)); } return(Nom.CompareTo(other.Nom)); }
public void MiseEnForme() { Nom = Nom.ToUpper(); Prénom = Prénom.Substring(0, 1).ToUpper() + Prénom.Substring(1).ToLower(); }