IDynamicInterfaceCastable Interface

Definition

Interface used to participate in a type cast failure.

C#
public interface IDynamicInterfaceCastable
Derived

Remarks

Implementation of this interface on a value type will be ignored. Only non-value types are allowed to participate in a type cast failure through this interface.

Methods

GetInterfaceImplementation(RuntimeTypeHandle)

Called during interface dispatch when the given interface type cannot be found in the class's metadata.

IsInterfaceImplemented(RuntimeTypeHandle, Boolean)

Called when an implementing class instance is cast to an interface type that is not contained in the class's metadata.

Applies to

Product Versions
.NET 5, 6, 7, 8, 9