' ### LOADING IT
Private a As [Assembly]
a = [Assembly].LoadFrom("DP.ModuleHandler.TestModule.dll")
Dim t As Type = a.GetType("DP.ModuleHandler.TestModule.ModuleTest.TestClass")
Dim obj1 As Object
obj1 = Activator.CreateInstance(t)
obj1.GetType().InvokeMember("CallMeWithNoParams", BindingFlags.Default Or BindingFlags.InvokeMethod, Nothing, obj1, New Object)
' ### THE MODULE
'Namespace DP.ModuleHandler.TestModule
Namespace ModuleTest
Public Class TestClass
Implements MyInterface
' # THE INTERFACE
Interface MyInterface
Function Add(ByVal a As Integer, ByVal b As Integer) As Integer
End Interface
Public Function Add(ByVal a As Integer, ByVal b As Integer) As Integer Implements MyInterface.Add
Return a + b
End Function
Public Sub CallMeWithNoParams()
MsgBox("Successfully called TestClass.CallMeWithNoParams()")
End Sub
End Class
End Namespace