ModuleBuilder.SetUserEntryPoint(MethodInfo) 方法

定義

設定使用者進入點。

public:
 void SetUserEntryPoint(System::Reflection::MethodInfo ^ entryPoint);
public void SetUserEntryPoint (System.Reflection.MethodInfo entryPoint);
member this.SetUserEntryPoint : System.Reflection.MethodInfo -> unit
Public Sub SetUserEntryPoint (entryPoint As MethodInfo)

參數

entryPoint
MethodInfo

使用者進入點。

例外狀況

entryPointnull

這個方法要在不是偵錯模組的動態模組上呼叫。

-或-

entryPoint 不包含於這個動態模組中。

備註

編譯程式可能會在呼叫使用者main之前產生啟動存根。 啟動存根將會是進入點。 雖然使用者主要會是使用者進入點,讓調試程式不會逐步進入編譯程序進入點。

注意

從 .NET Framework 2.0 Service Pack 1 開始,此成員不再需要 ReflectionPermissionReflectionPermissionFlag.ReflectionEmit標。 (請參閱反映發出中的安全性問題.) 若要使用這項功能,您的應用程式應以 .NET Framework 3.5 或更新版本為目標。

適用於