Method CreateDelegate
CreateDelegate<T>(MethodBase)
Creates a delegate of the specified type from this method.
public static T CreateDelegate<T>(this MethodBase method) where T : Delegate
Parameters
methodMethodBase- The method to create the delegate from.
Returns
- T
- The delegate for this method.
Type Parameters
T- The type of the delegate to create.
CreateDelegate<T>(MethodBase, object?)
Creates a delegate of the specified type with the specified target from this method.
public static T CreateDelegate<T>(this MethodBase method, object? target) where T : Delegate
Parameters
methodMethodBase- The method to create the delegate from.
targetobject- The object targeted by the delegate.
Returns
- T
- The delegate for this method.
Type Parameters
T- The type of the delegate to create.
CreateDelegate(MethodBase, Type)
Creates a delegate of the specified type from this method.
public static Delegate CreateDelegate(this MethodBase method, Type delegateType)
Parameters
methodMethodBase- The method to create the delegate from.
delegateTypeType- The type of the delegate to create.
Returns
- Delegate
- The delegate for this method.
CreateDelegate(MethodBase, Type, object?)
Creates a delegate of the specified type with the specified target from this method.
public static Delegate CreateDelegate(this MethodBase method, Type delegateType, object? target)
Parameters
methodMethodBase- The method to create the delegate from.
delegateTypeType- The type of the delegate to create.
targetobject- The object targeted by the delegate.
Returns
- Delegate
- The delegate for this method.