Load Assembly from DLL : Assembly « Development « VB.Net Tutorial






Option Strict On

Imports System.IO
Imports System.Reflection

Public Module Reflection
   Public Sub Main
      Const path As String = "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll"

      If File.Exists(path) Then
         Dim ass As Assembly = Assembly.LoadFrom(path)
         Dim typ As Type = ass.GetType("System.Array")
         Dim members As MemberInfo() = typ.GetMembers(BindingFlags.Instance _
                                       Or BindingFlags.Public)

         Console.WriteLine(members.Length)
      End If
   End Sub
End Module
43








7.19.Assembly
7.19.1.Load Assembly from DLL
7.19.2.Given an assembly, display details from its manifest
7.19.3.Get Assembly: Code base, Full name, Entry point, Assembly Cache, Location
7.19.4.Get types from Assembly
7.19.5.Get Referenced Assemblies
7.19.6.Load Assembly from a url