예제 #1
0
 static NOTE[] BubbleSort(NOTE[] mas)
 {
     for (int i = 0; i < mas.Length - 1; i++)
     {
         for (int j = 0; j < mas.Length - 1 - i; j++)
         {
             if (mas[j].treenumberofphone > mas[j + 1].treenumberofphone)
             {
                 NOTE tmp = mas[j];
                 mas[j]     = mas[j + 1];
                 mas[j + 1] = tmp;
             }
         }
     }
     return(mas);
 }
예제 #2
0
        static void Main(string[] args)
        {
            NOTE[] user = new NOTE[8];
            EnterInfo(user);
            OutPutInfo(user);
            bool Exit = false;

            while (!Exit)
            {
                Console.Write("Введите имя человека: ");
                string searchname = Console.ReadLine();
                SearchOnePerson(user, searchname);
                Console.Write("Хотите продолжить?\n[1-Да,2-Нет]:  ");
                int choose = Convert.ToInt32(Console.ReadLine());
                if (choose != 1)
                {
                    Exit = true;
                }
            }
        }