C# WPF How to set Property setter method dynamically?
问题 I've been searching around but I just can't seem to find what I'm looking for, so I'll give it a go here. Situation: I have the class MainWindow and MainWindowData. In MainWindowData are only public properties defined with the attribute UpdateGUI. public class UpdateGUI : Attribute { } public class MainWindowData { [UpdateGUI] public string TESTVAR { get; set; } } Now I want to add a method to each property's setter method in MainWindowData. More specific: void OnPropertyChanged(String