All rules
CA1419Portability and interoperability Enabled by default: As suggestion

Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'

Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'

Microsoft docs

Description

Providing a parameterless constructor that is as visible as the containing type for a type derived from System.Runtime.InteropServices.SafeHandle enables better performance and usage with source-generated interop solutions.

Cause

A concrete System.Runtime.InteropServices.SafeHandle type requires a parameterless constructor that is at least as visible as the containing type.

How to fix violations

Add a parameterless constructor to your type.

When to suppress

Do not suppress a warning from this rule.

Group results
0 yes 0 no
ConsensusNone (disabled)
Severity preference (yes voters)
Suggestion0
Warning0
Error0