AssemblyBuilder.SetEntryPoint 方法

定义

设置此动态程序集的入口点。

重载

名称 说明
SetEntryPoint(MethodInfo)

设置此动态程序集的入口点,假定正在生成控制台应用程序。

SetEntryPoint(MethodInfo, PEFileKinds)

设置此程序集的入口点,并定义要生成的可移植可执行文件(PE 文件)的类型。

SetEntryPoint(MethodInfo)

设置此动态程序集的入口点,假定正在生成控制台应用程序。

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

参数

entryMethod
MethodInfo

对表示此动态程序集入口点的方法的引用。

例外

entryMethodnull

entryMethod 未包含在此程序集中。

调用方没有所需的权限。

适用于

SetEntryPoint(MethodInfo, PEFileKinds)

设置此程序集的入口点,并定义要生成的可移植可执行文件(PE 文件)的类型。

public:
 void SetEntryPoint(System::Reflection::MethodInfo ^ entryMethod, System::Reflection::Emit::PEFileKinds fileKind);
public void SetEntryPoint(System.Reflection.MethodInfo entryMethod, System.Reflection.Emit.PEFileKinds fileKind);
member this.SetEntryPoint : System.Reflection.MethodInfo * System.Reflection.Emit.PEFileKinds -> unit
Public Sub SetEntryPoint (entryMethod As MethodInfo, fileKind As PEFileKinds)

参数

entryMethod
MethodInfo

对表示此动态程序集入口点的方法的引用。

fileKind
PEFileKinds

要生成的程序集可执行文件的类型。

例外

entryMethodnull

entryMethod 未包含在此程序集中。

调用方没有所需的权限。

适用于