Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace PhotoSift
- {
- /// <summary>
- /// Contains all PhotoSift settings. Most attributes control appearance in the PropertyGrid in frmSettings.
- /// </summary>
- [Serializable]
- [DefaultProperty("FileMode")]
- public class AppSettings : GlobalizedObject
- {
- ...
- // Key Folder group
- [Category("Key Folders"), DisplayName("A"), LocalizedDescription("blablabla")]
- [Editor(typeof(FolderNameEditor2), typeof(UITypeEditor))]
- public string KeyFolder_A { get; set; }
- [Category("Key Folders"), DisplayName("B"), LocalizedDescription("blablabla")]
- [Editor(typeof(FolderNameEditor2), typeof(UITypeEditor))]
- public string KeyFolder_B { get; set; }
- [Category("Key Folders"), DisplayName("C"), LocalizedDescription("blablabla")]
- [Editor(typeof(FolderNameEditor2), typeof(UITypeEditor))]
- public string KeyFolder_C { get; set; }
- [Category("Key Folders"), DisplayName("D"), LocalizedDescription("blablabla")]
- [Editor(typeof(FolderNameEditor2), typeof(UITypeEditor))]
- ....
- }
- }
- .....
- PropertyInfo Prop = ( typeof( AppSettings ) ).GetProperty( "KeyFolder_" + KeyName );
- Prop.SetValue(Prop.Name, "new value");
- .....
- ERROR:
- System.Reflection.TargetException: 'Object does not match target type.'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement