This project is read-only.

Explicit interface property implementation

Topics: Metadata Model
Apr 28, 2010 at 7:17 PM
Edited Apr 29, 2010 at 9:25 AM

Hello.

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 7:28 PM
Edited Apr 28, 2010 at 11: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...