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 NotInheritable Class ComVisibleAttribute : Inherits Attribute
' Public Constructors
   Public Sub New( ByVal visibility As Boolean) 
' Public Instance Properties
   Public ReadOnly Property Value As Boolean  
End Class

Hierarchy

System.ObjectSystem.Attribute ComVisibleAttribute

Valid On

Assembly, Class, Struct, Enum, Method, Property, Field, Interface, Delegate

Get VB.NET Core Classes 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.