コード例 #1
0
ファイル: Club.cs プロジェクト: VLNTNF/tennis-club-manager
        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
ファイル: Club.cs プロジェクト: VLNTNF/tennis-club-manager
        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);
        }