System.Reflection.Emit.ModuleBuilder.SetUserEntryPoint Method

Sets the user entry point.

Syntax

public void SetUserEntryPoint (System.Reflection.MethodInfo entryPoint)

Parameters

entryPoint
The user entry point.

Remarks

The compiler might generate a startup stub before calling user main. The startup stub will be the entry point. While the user main will be the user entry point so that debugger will not step into the compiler entry point.

Note:

Starting with the net_v20sp1_long, this member no longer requires System.Security.Permissions.ReflectionPermission with the System.Security.Permissions.ReflectionPermissionFlag.ReflectionEmit flag. (See Security Issues in Reflection Emit.) To use this functionality, your application should target the net_v35_long or later.

Requirements

Namespace: System.Reflection.Emit
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0