Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 public void MiseEnForme()
 {
     Nom    = Nom.ToUpper();
     Prénom = Prénom.Substring(0, 1).ToUpper() + Prénom.Substring(1).ToLower();
 }