System.Runtime.InteropServices.ImportedFromTypeLibAttribute Class

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

See Also: ImportedFromTypeLibAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Assembly, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class ImportedFromTypeLibAttribute : Attribute

Remarks

You can apply this attribute to assemblies, although the [<topic://cpgrftypelibraryImportertlbimpexe>] 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 System.Runtime.InteropServices.ComImportAttribute, which specifies that an individual type is implemented in COM.

Requirements

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