Indicates that the attributed type was previously defined in COM.
For a list of all members of this type, see ComImportAttribute Members.
[Visual Basic] <AttributeUsage(AttributeTargets.Class Or _ AttributeTargets.Interface)> NotInheritable Public Class ComImportAttribute Inherits Attribute [C#] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)] public sealed class ComImportAttribute : Attribute [C++] [AttributeUsage(AttributeTargets::Class | AttributeTargets::Interface)] public __gc __sealed class ComImportAttribute : public Attribute [JScript] public AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface) class ComImportAttribute extends Attribute
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
You can apply this attribute to classes or interfaces, although the Type Library Importer (Tlbimp.exe) typically applies it for you when it imports a type library.
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.
A pseudo-custom attribute indicates that bits of the core metadata of a type need to be set when the attribute is present. Unlike a custom attribute that extends the metadata for a type and is saved along with the type, a pseudo-custom attribute modifies the metadata for the type and is discarded.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: Mscorlib (in Mscorlib.dll)