Windows apps
Collapse the table of content
Expand the table of content
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, Type, String)

Creates a delegate of the specified type that represents the specified static method of the specified class.

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

public static Delegate CreateDelegate(
	Type type,
	Type target,
	string method


Type: System.Type
The type of delegate to create.
Type: System.Type
The class that implements method.
Type: System.String
The name of the static method that the delegate is to represent.

Return Value

Type: System.Delegate
A delegate of the specified type that represents the specified static method of the specified class.


type is null.


target is null.


method is null.


type does not inherit MulticastDelegate.


type is not a RuntimeType. See Runtime Types in Reflection.


target is not a RuntimeType.


target is an open generic type. That is, its ContainsGenericParameters property is true.


method is not a static method (Shared method in Visual Basic).


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 static 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.

In Silverlight, method must specify an accessible method.

This method overload is equivalent to calling the CreateDelegate(Type, Type, String, Boolean, Boolean) method overload, and specifying false for ignoreCase and true for throwOnBindFailure.

Platform Notes

Silverlight for Windows Phone Silverlight for Windows Phone

 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.


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2016 Microsoft