DynamicMethod Constructor (String, MethodAttributes, CallingConventions, Type, Type, Type, Boolean)
May 11, 2014For apps that target Windows Phone OS 7.0 and 7.1, do not use this member in your app. If you do, your code will throw a MethodAccessException. This member is security-critical, which restricts it to internal use by the .NET Framework for Windows Phone class library.
Creates a dynamic method, specifying the method name, attributes, calling convention, return type, parameter types, the type with which the dynamic method is logically associated, and whether just-in-time (JIT) visibility checks should be skipped for types and members accessed by the Microsoft intermediate language (MSIL) of the dynamic method.
Assembly: mscorlib (in mscorlib.dll)
[SecurityCriticalAttribute] public DynamicMethod( string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type parameterTypes, Type owner, bool skipVisibility )
- Type: System.String
The name of the dynamic method. This can be a zero-length string, but it cannot be null.
- Type: System.Reflection.MethodAttributes
A bitwise combination of MethodAttributes values that specifies the attributes of the dynamic method. The only combination allowed is Public and Static.
- Type: System.Reflection.CallingConventions
The calling convention for the dynamic method. Must be Standard.
- Type: System.Type
A Type object that specifies the return type of the dynamic method, or null if the method has no return type.
An array of Type objects specifying the types of the parameters of the dynamic method, or null if the method has no parameters.
- Type: System.Type
A Type with which the dynamic method is logically associated. The dynamic method has access to all members of the type.
- Type: System.Boolean
true to skip JIT visibility checks on types and members accessed by the MSIL of the dynamic method; otherwise, false.