ManagedToNativeComInteropStubAttribute(Type, String) Constructor

Definition

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

C#
public ManagedToNativeComInteropStubAttribute(Type classType, string methodName);

Parameters

classType
Type

The class that contains the required stub method.

methodName
String

The name of the stub method.

Exceptions

methodName cannot be found.

-or-

The method is not static or non-generic.

-or-

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.

Applies to

Tuote Versiot
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.1