System.Reflection.Assembly Class

Represents an assembly, which is a reusable, versionable, and self-describing building block of a common language runtime application.

See Also: Assembly Members


public abstract class Assembly : ICustomAttributeProvider, System.Runtime.InteropServices._Assembly, System.Runtime.Serialization.ISerializable, System.Security.IEvidenceFactory


Use the System.Reflection.Assembly class to load assemblies, to explore the metadata and constituent parts of assemblies, to discover the types contained in assemblies, and to create instances of those types.

To get an array of System.Reflection.Assembly objects representing the assemblies currently loaded into an application domain (for example, the default application domain of a simple project), use the AppDomain.GetAssemblies method.

To load assemblies dynamically, the System.Reflection.Assembly class provides the following static methods (Shared methods in Visual Basic). Assemblies are loaded into the application domain where the load operation occurs.

To get an System.Reflection.Assembly object for the currently executing assembly, use the Assembly.GetExecutingAssembly method.

Many members of the System.Reflection.Assembly class provide information about an assembly. For example:

The Assembly.GetTypes method lists all the types in the assembly. The Assembly.GetExportedTypes method lists the types that are visible to callers outside the assembly. The erload:System.Reflection.Assembly.GetType method can be used to search for a particular type in the assembly. The erload:System.Reflection.Assembly.CreateInstance method can be used to search for and create instances of types in the assembly.

For more information on assemblies, see Application Domains and Assemblies.

Thread Safety

This type is safe for multithreaded operations.


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