Hmm, that makes it a little understandable, COM is pure interface-based programming, and the actual implementation of the interfaces must be hidden. Implementing interface methods explicitly automatically gets you because they cannot be made public.
In fact, doing this is completely pointless, you could (and should) just apply the [ClassInterface(ClassInterfaceType.None)] attribute to the class. This in itself ensures that the implementation will not be shown, only the interfaces implemented by the class are visible. Implementing interface methods is clearly not enough. Because you cannot hide the fact that your class inherits from System.Object. Which provides four public Object methods and places a link to mscorlib.tlb in your type library, a link that a real COM client will never use. This will almost always work, because the likelihood that the compiler that uses your class runs on a computer on which .NET is not installed is quite small. But, nevertheless, it is very important, in fact, this is not required.
Just don't do it. Declare the interfaces that you implement, give them the [InterfaceType(ComInterfaceType.InterfaceIsDual)] attribute so that they can be used both early and late. And hide the actual implementation of them using [ClassInterface(ClassInterfaceType.None)] . Only a reasonable way.
source share