Assembly Class
Represents an assembly, which is a partially trusted, executable component that is the basic unit of deployment, versioning, reuse, activation, and security visibility for a .NET Framework application.
Summary
The Assembly
class provides access to information about an assembly, such as its name, version, and culture. It also allows you to load assemblies and retrieve types defined within them.
Constructors
Assembly()
Initializes a new instance of the Assembly
class.
public Assembly();
Properties
FullName
Gets the display name of the assembly.
public string FullName { get; }
IsDynamic
Gets a value indicating whether the assembly was generated dynamically.
public bool IsDynamic { get; }
Location
Gets the full path or UNC share where the assembly is located.
public string Location { get; }
ManifestModule
Gets the module that contains the manifest for the assembly.
public Module ManifestModule { get; }
Version
Gets the version of this assembly.
public Version Version { get; }
Methods
GetType(string typeName)
Gets the Type
with the specified name in the assembly.
public Type GetType(string typeName);
Parameters
- typeName: The full name of the type to retrieve.
Returns
The Type
with the specified name, or null
if the type is not found.
GetTypes()
Gets all the types defined in this assembly.
public Type[] GetTypes();
Returns
An array of Type
objects that represent all the types defined in the assembly. An empty array is returned if there are no types in the assembly.
Load(string assemblyString)
Loads an assembly from the specified file or uniform resource locator (URL).
public static Assembly Load(string assemblyString);
Parameters
- assemblyString: The name of the assembly to load.
Returns
The loaded assembly.