// Creating a Graphics object Graphics graphics = CreateGraphics(); // Creating a SolidBrush with a color SolidBrush brush = new SolidBrush(Color.White); // Clearing the drawing surface with the SolidBrush graphics.Clear(brush.Color);In this example, we create a Graphics object and a SolidBrush object with the color white. We then use the Clear method to clear the drawing surface of the Graphics object with the white color. Package library: The Clear method is part of the System.Drawing package, which is part of the .NET Framework.