System.Runtime.InteropServices.ComImportAttribute Class

Indicates that the attributed type was previously defined in COM.

See Also: ComImportAttribute Members


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


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.


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.


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