Loads an assembly named "example.exe" or "example.dll" into the current application domain : Assembly « Reflection « VB.Net Tutorial






Imports System
Imports System.Reflection

Public Class Asmload0
   Public Shared Sub Main()

      Dim a As [Assembly] = [Assembly].Load("example")

      Dim myType As Type = a.GetType("Example")

      Dim mymethod As MethodInfo = myType.GetMethod("MethodA")

      Dim obj As Object = Activator.CreateInstance(myType)

      mymethod.Invoke(obj, Nothing)
   End Sub 
End Class








19.8.Assembly
19.8.1.Loads an assembly named "example.exe" or "example.dll" into the current application domain
19.8.2.Fully qualified assembly name containing the specified class
19.8.3.IsDefined taking an Assembly as a parameter.
19.8.4.Get a type named Example from the assembly
19.8.5.Load an assembly into the current application domain