This documentation is archived and is not being maintained.

ImportedFromTypeLibAttribute Class

Indicates that the types defined within an assembly were originally defined in a type library.

For a list of all members of this type, see ImportedFromTypeLibAttribute Members.


[Visual Basic]
NotInheritable Public Class ImportedFromTypeLibAttribute
   Inherits Attribute
public sealed class ImportedFromTypeLibAttribute : Attribute
public __gc __sealed class ImportedFromTypeLibAttribute : public
class ImportedFromTypeLibAttribute extends Attribute

Thread Safety

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 assemblies, although the Type Library Importer (Tlbimp.exe) typically applies it for you when it a type library.

The primary use of the attribute is to capture the original source of the type information. For example, you can import A.tlb as an interop assembly called A.dll and have assembly B.dll reference A.dll. When you export B.dll to B.tlb, this attribute causes the references in B.tlb that point to A.dll to point instead to A.tlb. This should not be confused with the ComImportAttribute, which specifies that an individual type is implemented in COM.


Namespace: System.Runtime.InteropServices

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)

See Also

ImportedFromTypeLibAttribute Members | System.Runtime.InteropServices Namespace | Type Library Importer (Tlbimp.exe) | ComImportAttribute