Name
ComVisibleAttribute
Synopsis
By default, all public assemblies, types, and members that are registered with COM are visible to COM. This attribute is used with a false argument to hide an assembly, type, or member from COM. This attribute has a cascading effect: if you hide an assembly, all the public types in that assembly are hidden as well.
You can override this attribute on individual types. If,
for example, you want to make only one public type visible from
an assembly, add the attribute
[ComVisible(false)]
to the assembly, but also add
[ComVisible(true)]
to the one type that you
want to expose.
public sealed class ComVisibleAttribute : Attribute { // Public Constructors public method ComVisibleAttribute(bool visibility); // Public Instance Properties public field bool Value{get; } }
Hierarchy
System.Object→System.Attribute→ComVisibleAttribute
Valid On
Assembly, Class, Struct, Enum, Method, Property, Field, Interface, Delegate
Get C# in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.