Returns a new delegate with the specified static method as its invocation list.
- type
- The Type of Delegate to return. This Type is required to derive from Delegate .
- method
- A System.Reflection.MethodInfo that reflects a static method.
A Delegate of type type that invokes method.
Type Reason System.Security.Permissions.ReflectionPermission Requires permission to access type information. See System.Security.Permissions.ReflectionPermissionFlag.MemberAccess
Type Reason ArgumentNullException type or method is null. ArgumentException type does not derive from Delegate.
-or-
method does not reflect a static method.
ExecutionEngineException The Invoke method of the type delegate was not found. MethodAccessException The caller does not have the required permission. InvalidProgramException The Invoke method of the type delegate was not found.
Note: This method is used to dynamically create delegates that invoke static methods. To create a delegate that invokes instance methods, see Delegate.CreateDelegate(Type, object, string)(Type, object, string).
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0