MSDN has this article about [ComVisible]
attribute. I don't quite get what happens when one sets [ComVisible(true)]
.
MSDN says
The default is true, which indicates that the managed type is visible to COM. This attribute is not needed to make public managed assemblies and types visible; they are visible to COM by default. Only public types can be made visible.
So they say public types are visible to COM by default. But they also say only public types can be made visible by setting [ComVisible(true)]
. It does not makes sense: if public types are visible by default, then how does setting [ComVisible(true)]
make public types visible? If they're already visible how will they get more visible?
Perhaps my understanding is not correct. I shall appreciate if anyone can put some light on the above statements.