Delegate.CreateDelegate Method
.NET Framework 4
Creates a delegate of the specified type.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
| Name | Description | |
|---|---|---|
|
CreateDelegate(Type, MethodInfo) | Creates a delegate of the specified type to represent the specified static method. |
|
CreateDelegate(Type, Object, MethodInfo) | Creates a delegate of the specified type that represents the specified static or instance method, with the specified first argument. |
|
CreateDelegate(Type, Object, String) | Creates a delegate of the specified type that represents the specified instance method to invoke on the specified class instance. |
|
CreateDelegate(Type, MethodInfo, Boolean) | Creates a delegate of the specified type to represent the specified static method, with the specified behavior on failure to bind. |
|
CreateDelegate(Type, Type, String) | Creates a delegate of the specified type that represents the specified static method of the specified class. |
|
CreateDelegate(Type, Object, MethodInfo, Boolean) | Creates a delegate of the specified type that represents the specified static or instance method, with the specified first argument and the specified behavior on failure to bind. |
|
CreateDelegate(Type, Object, String, Boolean) | Creates a delegate of the specified type that represents the specified instance method to invoke on the specified class instance with the specified case-sensitivity. |
|
CreateDelegate(Type, Type, String, Boolean) | Creates a delegate of the specified type that represents the specified static method of the specified class, with the specified case-sensitivity. |
|
CreateDelegate(Type, Object, String, Boolean, Boolean) | Creates a delegate of the specified type that represents the specified instance method to invoke on the specified class instance, with the specified case-sensitivity and the specified behavior on failure to bind. |
|
CreateDelegate(Type, Type, String, Boolean, Boolean) | Creates a delegate of the specified type that represents the specified static method of the specified class, with the specified case-sensitivity and the specified behavior on failure to bind. |
Valid firstArgument
> If method is static (Shared in Visual Basic) and its first parameter is of type Object or ValueType, then firstArgument can be a value type.
Another case of this rule: if first parameter is of type System.Enum, then firstArgument can be any enum type.
P.S.
This comment for (http://msdn.microsoft.com/en-us/library/74x8f551.aspx).
Another case of this rule: if first parameter is of type System.Enum, then firstArgument can be any enum type.
P.S.
This comment for (http://msdn.microsoft.com/en-us/library/74x8f551.aspx).