The following VB.NET program retrieves the assemblies that have been loaded into the execution context of this application domain. Assembly represents a reusable, versionable, and self-describing building block of a Common Language Runtime application.
System.Reflection.Assembly
The System.Reflection namespace contains types that retrieve information about assemblies, modules, members, parameters, and other entities in managed code by examining their metadata. We use the AppDomain.GetAssemblies method to retrieve an array of Assembly objects representing the assemblies currently loaded into an application domain.
Dim _appDomain As AppDomain Dim myAssemblies() As Reflection.Assembly _appDomain = AppDomain.CurrentDomainmyAssemblies = _appDomain.GetAssemblies
Use the 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.
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim _appDomain As AppDomain Dim myAssemblies() As Reflection.Assembly Dim myAssembly As Reflection.Assembly _appDomain = AppDomain.CurrentDomain myAssemblies = _appDomain.GetAssemblies For Each myAssembly In myAssemblies MsgBox(myAssembly.FullName) Next End Sub End Class