public override void SetValue (object obj, object val, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
{
if (!IsStatic && obj == null)
throw new TargetException ("Non-static field requires a target");
if (IsLiteral)
throw new FieldAccessException ("Cannot set a constant field");
if (binder == null)
binder = Binder.DefaultBinder;
CheckGeneric ();
if (val != null) {
object newVal;
newVal = binder.ChangeType (val, type, culture);
if (newVal == null)
throw new ArgumentException ("Object type " + val.GetType() + " cannot be converted to target type: " + type, "val");
val = newVal;
}
SetValueInternal (this, obj, val);
}