Sets the user entry point.
[Visual Basic] Public Sub SetUserEntryPoint( _ ByVal entryPoint As MethodInfo _ ) [C#] public void SetUserEntryPoint( MethodInfo entryPoint ); [C++] public: void SetUserEntryPoint( MethodInfo* entryPoint ); [JScript] public function SetUserEntryPoint( entryPoint : MethodInfo );
Exception Type | Condition |
---|---|
ArgumentNullException | if entryPoint is a null reference (in Visual Basic Nothing) |
InvalidOperationException | if this method is called on a dynamic module that is not a debug module or if entryPoint is not contained in this dynamic module |
The compiler may 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.
NGWS Runtime Security:
ReflectionPermission | SecurityAction.Demand, ReflectionEmit |
ModuleBuilder Class | ModuleBuilder Members | System.Reflection.Emit Namespace