Exemplo n.º 1
0
        static void Main(string[] args)
        {
            DanhSachHinhHoc ds = new DanhSachHinhHoc();

            ds.Nhap();
            Console.WriteLine(ds);
            Console.WriteLine(10);

            Console.ReadKey();
        }
Exemplo n.º 2
0
        public DanhSachHinhHoc TimDSHinhVuongMin()
        {
            DanhSachHinhHoc kq  = new DanhSachHinhHoc();
            float           min = TimMinHinhVuong();

            //foreach(var h in ds)
            //{
            //    if(h is HinhVuong && h.TinhDT()==min)
            //    {
            //        kq.Them(h);
            //    }
            //}

            //return kq;
            kq.ds.AddRange(ds.FindAll(x => x is HinhVuong && x.TinhDT() == min));
            return(kq);
        }