IDynamicInterfaceCastable Interface

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

Produk Versi
.NET 5, 6, 7, 8, 9, 10