Defines a global method with the specified name, attributes, calling convention, return type, and parameter types.
- name
- The name of the method. name cannot contain embedded nulls.
- attributes
- The attributes of the method. attributes must include System.Reflection.MethodAttributes.Static.
- callingConvention
- The calling convention for the method.
- returnType
- The return type of the method.
- parameterTypes
- The types of the method's parameters.
The defined global method.
You cannot use the global method that this method defines until you call ModuleBuilder.CreateGlobalFunctions.
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.