Method CastDelegate
CastDelegate<T>(Delegate)
Cast a delegate from one type to another. Compatible with delegates holding an invocation list (combined delegates).
public static T CastDelegate<T>(this Delegate source) where T : DelegateParameters
- sourceDelegate
- The input delegate.
Returns
- T
- The output delegate.
Type Parameters
- T
CastDelegate(Delegate?, Type)
Cast a delegate from one type to another. Compatible with delegates holding an invocation list (combined delegates).
public static Delegate? CastDelegate(this Delegate? source, Type type)Parameters
Returns
- Delegate
- The output delegate.