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