public void xoa(object obj, sosanh ss) { for (int i = ds.Count - 1; i >= 0; i--) { if (ss(obj, this[i]) == 0) { this.ds.RemoveAt(i); } } }
public sinhvien tim(object obj, sosanh ss) { sinhvien svresult = null; foreach (sinhvien sinhvien in ds) { if (ss(obj, sinhvien) == 0) { svresult = sinhvien; break; } } return(svresult); }
public SinhVien tim(object obj, sosanh ss) { SinhVien res = null; foreach (SinhVien sv in ds) { if (ss(obj, sv) == 0) { res = sv; break; } } return(res); }
public bool sua(sinhvien sv, object obj, sosanh ss) { bool kq = false; for (int i = 0; i < ds.Count - 1; i++) { if (ss(obj, this[i]) == 0) { this[i] = sv; kq = true; break; } } return(kq); }
public bool sua(SinhVien svedit, object obj, sosanh ss) { int i, count; bool kq = false; count = this.ds.Count - 1; for (i = 0; i < count; i++) { if (ss(obj, this[i]) == 0) { this[i] = svedit; kq = true; break; } } return(kq); }