System.Runtime.InteropServices.ComImportAttribute Class

Indicates that the attributed type was previously defined in COM.

See Also: ComImportAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface | System.AttributeTargets.All, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class ComImportAttribute : Attribute

Remarks

You can apply this attribute to classes or interfaces, although the [<topic://cpgrfTypeLibraryImporterTlbimpexe>] typically applies it for you when it imports a type library.

System.Runtime.InteropServices.ComImportAttribute is a pseudo-custom attribute that indicates that a type has been defined in a previously published type library. The common language runtime treats these types differently when activating, exporting, coercing, and so on.

Note:

All base COM types that are inherited by a managed object must aggregate the Free Threaded Marshaller (FTM). COM types that do not aggregate the FTM can't be inherited by managed objects.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0