MethodInfo.CreateDelegate Method   
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a delegate from this method.
Overloads
| CreateDelegate(Type) | Creates a delegate of the specified type from this method. | 
| CreateDelegate(Type, Object) | Creates a delegate of the specified type with the specified target from this method. | 
| CreateDelegate<T>() | Creates a delegate of type  | 
| CreateDelegate<T>(Object) | Creates a delegate of type  | 
CreateDelegate(Type)
- Source:
- MethodInfo.cs
- Source:
- MethodInfo.cs
- Source:
- MethodInfo.cs
- Source:
- MethodInfo.cs
Creates a delegate of the specified type from this method.
public:
 virtual Delegate ^ CreateDelegate(Type ^ delegateType);public virtual Delegate CreateDelegate(Type delegateType);abstract member CreateDelegate : Type -> Delegate
override this.CreateDelegate : Type -> DelegatePublic Overridable Function CreateDelegate (delegateType As Type) As DelegateParameters
- delegateType
- Type
The type of the delegate to create.
Returns
The delegate for this method.
Applies to
CreateDelegate(Type, Object)
- Source:
- MethodInfo.cs
- Source:
- MethodInfo.cs
- Source:
- MethodInfo.cs
- Source:
- MethodInfo.cs
Creates a delegate of the specified type with the specified target from this method.
public:
 virtual Delegate ^ CreateDelegate(Type ^ delegateType, System::Object ^ target);public virtual Delegate CreateDelegate(Type delegateType, object target);public virtual Delegate CreateDelegate(Type delegateType, object? target);abstract member CreateDelegate : Type * obj -> Delegate
override this.CreateDelegate : Type * obj -> DelegatePublic Overridable Function CreateDelegate (delegateType As Type, target As Object) As DelegateParameters
- delegateType
- Type
The type of the delegate to create.
- target
- Object
The object targeted by the delegate.
Returns
The delegate for this method.
Applies to
CreateDelegate<T>()
- Source:
- MethodInfo.cs
- Source:
- MethodInfo.cs
- Source:
- MethodInfo.cs
- Source:
- MethodInfo.cs
Creates a delegate of type T from this method.
public:
generic <typename T>
 where T : Delegate T CreateDelegate();public T CreateDelegate<T>() where T : Delegate;member this.CreateDelegate : unit -> 'T (requires 'T :> Delegate)Public Function CreateDelegate(Of T As Delegate) () As TType Parameters
- T
The type of the delegate to create.
Returns
The delegate for this method.
Applies to
CreateDelegate<T>(Object)
- Source:
- MethodInfo.cs
- Source:
- MethodInfo.cs
- Source:
- MethodInfo.cs
- Source:
- MethodInfo.cs
Creates a delegate of type T with the specified target from this method.
public:
generic <typename T>
 where T : Delegate T CreateDelegate(System::Object ^ target);public T CreateDelegate<T>(object? target) where T : Delegate;member this.CreateDelegate : obj -> 'T (requires 'T :> Delegate)Public Function CreateDelegate(Of T As Delegate) (target As Object) As TType Parameters
- T
The type of the delegate to create.
Parameters
- target
- Object
The object targeted by the delegate.
Returns
The delegate for this method.