public static void SetPropertyAsString(this IReflectionExtension self, string propertyName, object value) { var property = TypeDescriptor.GetProperties(self)[propertyName]; //var convertedValue = property.Converter.ConvertFrom(value); property.SetValue(self, value); }
public static object GetPropertyAsObject(this IReflectionExtension self, string propertyName) { var property = TypeDescriptor.GetProperties(self)[propertyName]; return(property.GetValue(self)); }