TypeBuilder.AddInterfaceImplementation Method (Type)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Adds an interface that this type implements.

Namespace:   System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

[<ComVisibleAttribute(true)>]
member AddInterfaceImplementation : 
        interfaceType:Type -> unit

Parameters

interfaceType
Type: System.Type

The interface that this type implements.

Exception Condition
ArgumentNullException

interfaceType is null.

InvalidOperationException

The type was previously created using CreateType.

The following code sample demonstrates the implementation of an interface on a dynamically created type using AddInterfaceImplementation.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Return to top
Show: