src/Mimp.SeeSharper.Reflection/FieldInfoExtensions.cs
/// <summary>
/// Return a compiled delegate to assign the field with a parameter of the field type.
/// </summary>
/// <param name="field"></param>
/// <returns></returns>
/// <exception cref="ArgumentNullException"></exception>
Return a compiled delegate to assign the field with a parameter of the field type.
Return a compiled delegate to assign the field with a parameter of the field type .
public static Delegate GetInstanceAssignDelegate(this FieldInfo field)
        {
            if (field is null)
                throw new ArgumentNullException(nameof(field));
            return field.GetInstanceAssignDelegate(Expression.GetActionType(field.ReflectedType!, field.FieldType));
        }
public static Delegate GetInstanceAssignDelegate ( this FieldInfo field ) { if ( field is null ) throw new ArgumentNullException ( nameof ( field ) ) ; return field . GetInstanceAssignDelegate ( Expression . GetActionType ( field . ReflectedType ! , field . FieldType ) ) ; }
Return a compiled delegate to assign the field with a parameter of the field type.
Return a compiled delegate to assign the field with a parameter of the field type .
None
None
FieldInfo
this
field
None