I’m looping on the fields and properties on a given Type and I’d like to test if the field type or property Type implements INotifyPropertyChanged.
Maybe it sounds strange but I will parse fields/properties such as strings, integers and other types, but I also have some ObservableCollection for example and some custom types I defined that inherit from INotifyPropertyChanged.
So on my code, I’d like to do some tests based on the fact that the field or property implements INotifyPropertyChanged or not.
You can use
GetInterfaceorGetInterfaces:Or a slightly more generic approach: