public void FillRectangle(Brush brush, Rectangle rect);
using System.Drawing; class DrawRectangles { static void Main() { // create a new bitmap Bitmap bmp = new Bitmap(200, 200); // get the graphics object from the bitmap Graphics g = Graphics.FromImage(bmp); // create a brush for the fill color SolidBrush brush = new SolidBrush(Color.Red); // create a rectangle to fill Rectangle rect = new Rectangle(50, 50, 100, 100); // fill the rectangle with the brush color g.FillRectangle(brush, rect); // save the bitmap to a file bmp.Save("rectangles.bmp"); } }This program creates a new bitmap, gets the graphics object from the bitmap, creates a brush with a red fill color, creates a rectangle to fill, and finally fills the rectangle with the red color. The resulting bitmap is saved to a file named `rectangles.bmp`. The package library for the System FillRectangle method is the `System.Drawing` namespace, which provides access to classes for creating and manipulating graphics images and drawing text.