GraphicsDevice.Clear(Color.Black);
RenderTarget2D target = new RenderTarget2D(GraphicsDevice, 800, 600); GraphicsDevice.SetRenderTarget(target); GraphicsDevice.Clear(Color.Red);Package Library: The RenderTarget.Clear method is a part of the Microsoft.Xna.Framework.Graphics namespace which is included in the XNA Framework library. It is also included in the MonoGame library which is an open-source implementation of the XNA Framework.