I feel that this should be very possible.
I have an interface, let me call it IJerry. Now I have a class in the variable x. This class implements IJerry perfectly. The fact is that this class never refers to IJerry. I just have a perfect, compatible signature with IJerry.
Make sense? Let's say you create a class MyClass that implements INotifyPropertyChanged. Then you remove the declaration "MyClass: INotifyPropertyChanged" from the class, but you execute the implementation inside the class.
Is there a way to determine if a class implements an "interface" even if it does not explicitly reference it?
source
share