ManagedToNativeComInteropStubAttribute(Type, String) 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化一個以指定類別類型與方法名稱的新實例 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
這就是存根方法的名稱。
例外狀況
包含受管理互通方法的介面無法存取存根方法,因為存根方法具有私密或受保護的存取權限,或因安全問題。