.NET Framework 4.6 and 4.5
Releases all resources used by this Graphics.
Calling Dispose allows the resources used by this Graphics to be reallocated for other purposes.
The following code example is designed for use with Windows Forms, and it requires PaintEventArgs e, which is a parameter of the Paint event handler. The code performs the following actions:
Creates an Image from a graphics file SampImag.jpg in the example directory.
Creates a Graphics from the Image.
Alters the image by filling a rectangle within it.
Draws the Image to the screen.
Releases the created Graphics.
No code example is currently available or this language may not be supported.
Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
.NET Framework Client Profile
Supported in: 4, 3.5 SP1