AssemblyBuilder::SetEntryPoint Method (MethodInfo^, PEFileKinds)
Sets the entry point for this assembly and defines the type of the portable executable (PE file) being built.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- entryMethod
-
Type:
System.Reflection::MethodInfo^
A reference to the method that represents the entry point for this dynamic assembly.
- fileKind
-
Type:
System.Reflection.Emit::PEFileKinds
The type of the assembly executable being built.
| Exception | Condition |
|---|---|
| ArgumentNullException | entryMethod is null. |
| InvalidOperationException | entryMethod is not contained within this assembly. |
| SecurityException | The caller does not have the required permission. |
Note |
|---|
Starting with the .NET Framework 2.0 Service Pack 1, this member no longer requires ReflectionPermission with the ReflectionPermissionFlag::ReflectionEmit flag. (See Security Issues in Reflection Emit.) To use this functionality, your application should target the .NET Framework 3.5 or later. |
when invoked late-bound through mechanisms such as Type::InvokeMember. Associated enumeration: ReflectionPermissionFlag::MemberAccess.
Available since 1.1
Silverlight
Available since 2.0
