Since Application.CaptureScreenshot is now obsolete what has replaced it?

What is the recommended way of taking a screenshot now?

Looks like it’s been replaced by ScreenCapture.CaptureScreenshot