src/Mimp.SeeSharper.Reflection/ConstructorInfoExtensions.cs
/// <summary>
/// Return a compiled delegate to invoke the constructor with the structor like the constructor.
/// </summary>
/// <param name="constructor"></param>
/// <returns></returns>
/// <exception cref="ArgumentNullException"></exception>
Return a compiled delegate to invoke the constructor with the structor like the constructor.
Return a compiled delegate to invoke the constructor with the structor like the constructor .
public static Delegate GetDelegate(this ConstructorInfo constructor)
        {
            if (constructor is null)
                throw new ArgumentNullException(nameof(constructor));
            return constructor.GetDelegate(Expression.GetDelegateType(constructor.GetConstructorTypes().ToArray()));
        }
public static Delegate GetDelegate ( this ConstructorInfo constructor ) { if ( constructor is null ) throw new ArgumentNullException ( nameof ( constructor ) ) ; return constructor . GetDelegate ( Expression . GetDelegateType ( constructor . GetConstructorTypes ( ) . ToArray ( ) ) ) ; }
Return a compiled delegate to invoke the constructor with the structor like the constructor.
Return a compiled delegate to invoke the constructor with the structor like the constructor .
None
None
ConstructorInfo
this
constructor
None