Hi Michael,
Based on my test, it seems that if the inherited class in not in the same
assembly of parent class, we can load the assembly.
Here is my test result.
[ParentClass]
Public Class PC
Public mem As Integer
Public Sub New()
mem = 1
End Sub
Public Sub Test()
Console.WriteLine(mem)
End Sub
End Class
[ChildrenClass]
Public Class ChildClass
Inherits ParentClass.PC
Public Sub New()
Me.mem = 2
End Sub
Public Sub T()
Me.Test()
End Sub
End Class
Imports System.Reflection
Module Module1
Sub Main()
Dim ass As [Assembly] =
[Assembly].LoadFrom("<path>\ChildrenClass.dll")
Dim t As Type = ass.GetType("ChildrenClass.ChildClass")
Dim o As Object = Activator.CreateInstance(t,
BindingFlags.CreateInstance, Nothing, New Object() {}, Nothing, Nothing)
t.InvokeMember("T", BindingFlags.InvokeMethod, Nothing, o, New
Object() {}, Nothing, Nothing, Nothing)
End Sub
End Module
You may try the code above to see if that help you.
As for your scnario, can you send me the a simple reproduce sample by
removing the "Online" from my email address with detailed reproduce steps.
Also have you tried my suggestion that use the load method instead, did
that work for you?
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.