This documentation is archived and is not being maintained.

ManagedToNativeComInteropStubAttribute Constructor

Initializes a new instance of the ManagedToNativeComInteropStubAttribute class with the specified class type and method name.

Namespace:  System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

public ManagedToNativeComInteropStubAttribute(
	Type classType,
	string methodName


Type: System.Type
The class that contains the required stub method.
Type: System.String
The name of the stub method.


The stub method is not in the same assembly as the interface that contains the managed interop method.


classType is a generic type.


classType is an interface.


methodName cannot be found.


The method is not static or non-generic.


The method's parameter list does not match the expected parameter list for the stub.


The interface that contains the managed interop method has no access to the stub method, because the stub method has private or protected accessibility, or because of a security issue.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.