Explicit interface property implementation

Topics: Metadata Model
Apr 28, 2010 at 6:17 PM
Edited Apr 29, 2010 at 8:25 AM


How do I implement a property explicitly?

I'm creating a private accessor and I add it to ExplicitImplementationOverrides. When I go and check the resulting assembly in Reflector, I see the accessor implementation but it's not listed inside an explicit property implementation like it appears when I do something similar in C#.


Apr 28, 2010 at 6:28 PM
Edited Apr 28, 2010 at 10:29 PM

Apparently, adding a private property normally with the correct name (that is, prepending the interface name) is enough to make Reflector understand that the property as a whole is implemented explicitly.

In other words, a private property with the interface name prepended to its base name is an explicit implementation if and only if its accessors are explicit implementations (private methods listed in ExplicitImplementationOverrides).

This doesn't fix my other problem...