ComVisible
COMvisible refers to a .NET attribute used to control whether a type or an assembly is exposed to COM (Component Object Model) components. The attribute is implemented as ComVisibleAttribute, found in the System.Runtime.InteropServices namespace. It plays a key role in COM interop by signaling to COM clients whether the annotated code should be visible and accessible from unmanaged code.
The attribute can be applied at two levels: the assembly level and the individual type level. When
using System.Runtime.InteropServices;
public class MyComVisibleClass
{
// members accessible from COM
}
Impact and related considerations
Marking a type as ComVisible(true) makes it accessible to COM clients, subject to additional interop settings
ComVisible is supported in .NET Framework and is available in modern .NET runtimes with COM interop