<PackageReference Include="System.Drawing.Common" Version="9.0.0-preview.7.24405.4" />

CreateDcScope

struct CreateDcScope
Helper to scope lifetime of an HDC retrieved via CreateDC/CreateCompatibleDC. Deletes the HDC (if any) when disposed.
public HDC HDC { get; }

public bool IsNull { get; }

public CreateDcScope(HDC hdc)

Creates a compatible HDC for hdc using CreateCompatibleDC.

public CreateDcScope(string driverName, string deviceName = null, DEVMODEW* lpInitData = null, bool informationOnly = true)

public static WPARAM op_Explicit(ref CreateDcScope scope)

public static HDC op_Implicit(ref CreateDcScope scope)

public static HGDIOBJ op_Implicit(ref CreateDcScope scope)

public static IntPtr op_Implicit(ref CreateDcScope scope)

public void Dispose()