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
包含所需 Stub 方法的類別。
- methodName
- String
Stub 方法的名稱。
例外狀況
因為 Stub 方法具有私用或保護的存取範圍,或因為安全性問題,包含受 Managed Interop 方法的介面無法存取 Stub 方法。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應