DynamicMethod Constructor (String, Type, Type[], Type)

July 28, 2014

For 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.
[SECURITY CRITICAL]

Creates a dynamic method, specifying the method name, return type, parameter types, and the type with which the dynamic method is logically associated.

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

[SecurityCriticalAttribute]
public DynamicMethod(
	string name,
	Type returnType,
	Type[] parameterTypes,
	Type owner
)

Parameters

name
Type: System.String
The name of the dynamic method. This can be a zero-length string, but it cannot be null.
returnType
Type: System.Type
A Type object that specifies the return type of the dynamic method, or null if the method has no return type.
parameterTypes
Type: System.Type []
An array of Type objects specifying the types of the parameters of the dynamic method, or null if the method has no parameters.
owner
Type: System.Type
A Type with which the dynamic method is logically associated. The dynamic method has access to all members of the type.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2014 Microsoft