src/Mimp.SeeSharper.Reflection/TypeExtensions.Default.cs
/// <summary>
/// Return a compiled delegate to get the default of <paramref name="type"/>.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="type"></param>
/// <returns></returns>
/// <exception cref="ArgumentNullException"></exception>
/// <exception cref="InvalidOperationException">If type isn't castable to <typeparamref name="T"/>.</exception>
Return a compiled delegate to get the default of .
Return a compiled delegate to get the default of .
public static Func<T> GetDefaultFunc<T>(this Type type)
        {
            if (type is null)
                throw new ArgumentNullException(nameof(type));
            return type.GetDefaultDelegate<Func<T>>();
        }
public static Func < T > GetDefaultFunc < T > ( this Type type ) { if ( type is null ) throw new ArgumentNullException ( nameof ( type ) ) ; return type . GetDefaultDelegate < Func < T > > ( ) ; }
Return a compiled delegate to get the default of .
Return a compiled delegate to get the default of .
None
None
If type isn't castable to .
If type isn ' t castable to .
Type
this
type
None
typeparam
None