Exemple #1
0
        public int GetCategoriaMayoria()
        {
            int Nivel = 0, cant = 0;

            int[] Niveles = new int[4];

            for (int i = 0; i < Niveles.Length; i++)
            {
                Niveles[0] = Participantes.FindAll(p => p.TiempoEntrenando == (i + 1)).Count;
            }

            for (int i = 0; i < Niveles.Length; i++)
            {
                if (Niveles[i] >= cant)
                {
                    Nivel = Participantes.First().TiempoEntrenando;
                    cant  = Niveles[i];
                }
            }

            return(Nivel);
        }