Marshal.IsTypeVisibleFromCom(Type) Method

Definition

Indicates whether a type is visible to COM clients.

C#
public static bool IsTypeVisibleFromCom(Type t);

Parameters

t
Type

The type to check for COM visibility.

Returns

true if the type is visible to COM; otherwise, false.

Remarks

IsTypeVisibleFromCom enables you to check for COM visibility in one step. Types that are not visible cannot be used from COM. A type is visible if it is public and not hidden with the System.Runtime.InteropServices.ComVisibleAttribute.

Applies to

Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also