ManagedToNativeComInteropStubAttribute(Type, String) 建構函式

定義

初始化一個以指定類別類型與方法名稱的新實例 ManagedToNativeComInteropStubAttribute

public:
 ManagedToNativeComInteropStubAttribute(Type ^ classType, System::String ^ methodName);
public ManagedToNativeComInteropStubAttribute(Type classType, string methodName);
new System.Runtime.InteropServices.ManagedToNativeComInteropStubAttribute : Type * string -> System.Runtime.InteropServices.ManagedToNativeComInteropStubAttribute
Public Sub New (classType As Type, methodName As String)

參數

classType
Type

包含所需存根方法的類別。

methodName
String

這就是存根方法的名稱。

例外狀況

methodName 找不到。

-或-

此方法並非靜態或非通用。

-或-

方法的參數列表與存根預期的參數列表不符。

包含受管理互通方法的介面無法存取存根方法,因為存根方法具有私密或受保護的存取權限,或因安全問題。

適用於