Imports System.Reflection
Imports System
Public Class Program
Public Shared Sub Main()
Dim c1 As New Class1
Dim m As [Module] = c1.GetType().Module
Console.WriteLine("The current module is {0}.", m.Name)
Dim curAssembly As Assembly = Assembly.GetExecutingAssembly()
Console.WriteLine("The executing assembly is {0}.", curAssembly)
Dim mods() As [Module] = curAssembly.GetModules()
For Each md As [Module] In mods
Console.WriteLine("This assembly contains the {0} module", md.Name)
Next
End Sub
End Class
Class Class1
End Class