Type.GetInterfaces() for declared interfaces only
问题 First of all, there are many questions just like this, and perhaps some OPs were even asking this exact same question. The problem is that no answer to those questions (accepted or not) actually answer this question, at least none that I can find. How can I determine the interfaces a class declares directly, and not those inherited either by parents nor by the interfaces declared? e.g. interface I {} interface W : I {} class C : W {} class D : C, I {} class E : D {} Results: C declares W D