DispatchProxy.Create<T,TProxy> 方法

定義

建立衍生自類別 TProxy 的物件執行個體並實作介面 TCreates an object instance that derives from class TProxy and implements interface T.

public:
generic <typename T, typename TProxy>
 where TProxy : System::Reflection::DispatchProxy static T Create();
public static T Create<T,TProxy> () where TProxy : System.Reflection.DispatchProxy;
static member Create : unit -> 'T (requires 'Proxy :> System.Reflection.DispatchProxy)
Public Shared Function Create(Of T, TProxy) () As T

類型參數

T

Proxy 應執行的介面。The interface the proxy should implement.

TProxy

要用於 proxy 類別的基類。The base class to use for the proxy class.

傳回

T

實作 T 的物件執行個體。An object instance that implements T.

例外狀況

T 是一個類別,或 TProxy 已密封或沒有無參數建構函式。T is a class, or TProxy is sealed or does not have a parameterless constructor.

適用於