Ejemplo n.º 1
0
        //MostrarDatosSelección(): Displays the name of the country, the number of members and their data.
        //sin parameter below
        public string MostrarDatos(List <SeleccionFutbol> participants)
        {
            string result = "";

            if (this.GetCountryName() != "")
            {
                result += "COUNTRY NAME: " + this.GetCountryName() + " ";
            }
            if (this.GetActualNumberPlayers() != 0)
            {
                result += "NUMBER OF PLAYERS " + SeleccionFutbol.GetCount() + " ";
            }
            Console.WriteLine(result);

            foreach (SeleccionFutbol person in participants)
            {
                //to get the name of the person in the beginning
                Console.WriteLine(person.GetType().Name.ToUpper());
                Console.WriteLine(person.ToString());
                Console.WriteLine("**************************");
            }
            return(result);
        }