public static void SetPropertyValue(this object self, string propertyName, object value, object[] index = null) { GetPropertyInfo(self, propertyName) .SetValue(ReflectionUtil.GetReflectionObject(self), value, index); }
public static void SetFieldValue(this object self, string fieldName, object value, BindingFlags bindingFlags = BindingFlagsConst.All) { GetFieldInfo(self, fieldName, bindingFlags).SetValue(ReflectionUtil.GetReflectionObject(self), value); }