예제 #1
0
        public static Festmeny Legdragabb()
        {
            Festmeny legdragabb = festmenyek[0];

            for (int i = 1; i < festmenyek.Count; i++)
            {
                if (festmenyek[i].LegmagasabbLicit > legdragabb.LegmagasabbLicit)
                {
                    legdragabb = festmenyek[i];
                }
            }
            return(legdragabb);
        }
예제 #2
0
 public static void Sort()
 {
     for (int i = 0; i < festmenyek.Count; i++)
     {
         int ind = i;
         for (int j = ind; j < festmenyek.Count; j++)
         {
             if (festmenyek[ind].LegmagasabbLicit < festmenyek[j].LegmagasabbLicit)
             {
                 ind = j;
             }
         }
         if (ind != i)
         {
             Festmeny tmp = festmenyek[ind];
             festmenyek[ind] = festmenyek[i];
             festmenyek[i]   = tmp;
         }
     }
 }