public float TimMax_BK() { float max = float.MinValue; foreach (var item in DS_HH) { if (item is HinhTron) { HinhTron t = (HinhTron)item; if (max < t.bk) { max = t.bk; } } } return(max); }
public DanhSachHinhHoc Tim_HT_BK_Max(DanhSachHinhHoc a) { DanhSachHinhHoc kq = new DanhSachHinhHoc(); DanhSachHinhHoc DS = Tim_DS_HT(a); float max = DS.TimMax_BK(); foreach (var item in a.DS_HH) { if (item is HinhTron) { HinhTron t = (HinhTron)item; if (t.bk == max) { kq.Them(item); } } } return(kq); }