Imports System
Imports System.Reflection
Imports System.Security.Permissions
Public Class Example
Private factor As Integer
Public Sub New(ByVal f As Integer)
factor = f
End Sub
Public Function SampleMethod(ByVal x As Integer) As Integer
Return x * factor
End Function
Public Shared Sub Main()
Dim assem As [Assembly] = [Assembly].GetExecutingAssembly()
Dim assemName As AssemblyName = assem.GetName()
Console.WriteLine(vbLf + "Name: {0}", assemName.Name)
Console.WriteLine("Version: {0}.{1}", assemName.Version.Major, _
assemName.Version.Minor)
Console.WriteLine(vbLf + "Assembly CodeBase:")
Console.WriteLine(assem.CodeBase)
End Sub
End Class