IDynamicInterfaceCastable.GetInterfaceImplementation 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在介面分派期間當類別的中繼資料內找不到所指定介面類型時呼叫。
public:
RuntimeTypeHandle GetInterfaceImplementation(RuntimeTypeHandle interfaceType);
public RuntimeTypeHandle GetInterfaceImplementation (RuntimeTypeHandle interfaceType);
abstract member GetInterfaceImplementation : RuntimeTypeHandle -> RuntimeTypeHandle
Public Function GetInterfaceImplementation (interfaceType As RuntimeTypeHandle) As RuntimeTypeHandle
參數
- interfaceType
- RuntimeTypeHandle
介面型別。
傳回
應用來分派給目前物件上 interfaceType
的類型。
例外狀況
傳回的類型不是介面類型,或未以 DynamicInterfaceCastableImplementationAttribute 標記。
備註
呼叫此函式時,此物件的轉換應該已經透過 castclass/isinst
指示進行驗證。
傳回的型別必須是介面類別型,並以 標記 DynamicInterfaceCastableImplementationAttribute 。 否則, InvalidOperationException 將會擲回 。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將推出:在 2024 年,我們將隨著內容的意見反應機制逐步淘汰 GitHub 問題,並以新的意見反應系統來取代。 如需詳細資訊,請參閱提交並檢視相關的意見反應