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(); } }
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; } } } }