Getting declared base interfaces only #2118
-
Given I have a class:
calling any of the properties or methods that discover base types such as How do you suggest discovering just the "declared" interface implementation and not the implicit hierarchy? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The C# compiler already flattens the hierarchy for interfaces; there is no difference in IL between The IL is always:
|
Beta Was this translation helpful? Give feedback.
The C# compiler already flattens the hierarchy for interfaces; there is no difference in IL between
class MyDictionary : IDictionary<string, object> {}
and
class MyDictionary : IDictionary<string, object>, IEnumerable<KeyValuePair<K,V>> {}
The IL is always: