예제 #1
0
 public void nhap()
 {
     Console.WriteLine("nhap so l nv"); n = int.Parse(Console.ReadLine());
     a = new Nhanvien[n];
     for (int i = 0; i < n; i++)
     {
         a[i] = new Nhanvien();
         a[i].nhap();
     }
 }
예제 #2
0
 public void sapxep()
 {
     for (int i = 0; i < n; ++i)
     {
         for (int j = i + 1; i < n; ++j)
         {
             if (string.Compare(a[i].Hoten, a[j].Hoten) > 0)
             {
                 Nhanvien t = a[i];
                 a[i] = a[j];
                 a[j] = t;
             }
         }
     }
 }