All rules
CA2257Usage Enabled by default: As warning

Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'

Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'

Microsoft docs

Description

Since a type that implements IDynamicInterfaceCastable might not implement a dynamic interface in metadata, calls to an instance interface member that is not an explicit implementation defined on this type are likely to fail at runtime. Mark new interface members static to avoid runtime errors.

Cause

An interface member isn't explicitly implemented or marked static.

How to fix violations

Mark the interface member static.

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