示例#1
0
        public Personne SelectionnerPersonne()
        {
            AfficherPersonnes();
            Console.WriteLine();
            int      x = SaisiePositive("Numéro: ");
            Personne p = new Personne();

            if (x < Adherents.Count)
            {
                p = Adherents[x];
            }
            else if (x < Adherents.Count + Personnel.Count)
            {
                p = Personnel[x - Adherents.Count];
            }
            else if (x < Adherents.Count + Personnel.Count + Independants.Count)
            {
                p = Independants[x - Adherents.Count - Personnel.Count];
            }
            else
            {
                p = Independants.Last();
            }
            return(p);
        }
示例#2
0
        public Personne SelectionnerIndependant()
        {
            AfficherIndependants();
            Console.WriteLine();
            int      x = SaisiePositive("Numéro: ");
            Personne p = new Personne();

            if (x < Independants.Count)
            {
                p = Independants[x];
            }
            else
            {
                p = Independants.Last();
            }
            return(p);
        }