Пример #1
0
        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);
        }
Пример #2
0
        public float TimMax_BK()
        {
            float max = float.MinValue;

            foreach (var item in DSHinhHoc)
            {
                if (item is HinhTron)
                {
                    HinhTron t = (HinhTron)item;
                    if (max < t.BanKinh)
                    {
                        max = t.BanKinh;
                    }
                }
            }
            return(max);
        }
Пример #3
0
        //Tim hinh tron co ban kinh max
        public DanhSachHinhHoc TimHTBKMax(DanhSachHinhHoc a)
        {
            DanhSachHinhHoc ds  = Tim_DS_HT(a);
            DanhSachHinhHoc kq  = new DanhSachHinhHoc();
            float           max = ds.TimMax_BK();

            for (int i = 0; i < ds.Dai; i++)
            {
                if (ds[i] is HinhTron)
                {
                    HinhTron ht = (HinhTron)ds[i];
                    if (ht.BanKinh == max)
                    {
                        kq.Them(ds[i]);
                    }
                }
            }
            return(kq);
        }
Пример #4
0
        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);
        }