Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Delegate.CreateDelegate Method (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.

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

public static Delegate CreateDelegate(
	Type type,
	Object target,
	string method,
	bool ignoreCase,
	bool throwOnBindFailure


Type: System.Type
The type of delegate to create.
Type: System.Object
The class instance on which method is invoked.
Type: System.String
The name of the instance method that the delegate is to represent.
Type: System.Boolean
true to ignore the case when comparing the name of the method; otherwise, false.
Type: System.Boolean
true to throw an exception if method cannot be bound; otherwise, false.

Return Value

Type: System.Delegate
A delegate of the specified type that represents the specified instance method to invoke on the specified class instance.


type is null.


target is null.


method is null.


type does not inherit MulticastDelegate.


type is not a RuntimeType.


method is not an instance method.


method cannot be bound; for example, because it cannot be found, and throwOnBindFailure is true.


The Invoke method of type is not found.


The caller does not have access to method.


Application code attempts to access this member late-bound, for example, by using the Type.InvokeMember method.

This method creates delegates for instance methods only. An instance method is a method that is associated with an instance of a class; a static method is a method that is associated with the class itself.

method must specify an accessible method.

Platform Notes

 CreateDelegate throws MissingMethodException when attempting to create a delegate with incorrect arguments. Delegate.CreateDelegate throws TargetInvocationException when called on a null object. Delegate.CreateDelegate throws MissingMethodException instead of ArgumentException for non-instance methods.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2015 Microsoft