Export (0) Print
Expand All

TypeBuilder.AddInterfaceImplementation Method

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.

ExceptionCondition
ArgumentNullException

interfaceType is a null reference (Nothing in Visual Basic).

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft