Hi.
I am working on a program that requires me to load 2 dll at runtime.
My code is as shown below:
But an exception hsa occurred when i.his() is called. Apparently, i is still NULL. When I check, I realise that b is loading from a.dll instead of b.dll.
But I have already make sure b LoadFrom b.dll. Can anyone advise?
I am working on a program that requires me to load 2 dll at runtime.
My code is as shown below:
VB.NET:
Dim i as object
Dim j as object
Dim a As System.Reflection.Assembly = System.Reflection.Assembly.LoadFrom("C:\a.dll")
j = a.CreateInstance("ClassLibrary1.Class2")
Dim b As System.Reflection.Assembly = System.Reflection.Assembly.LoadFrom("C:\b.dll")
i = b.CreateInstance("ClassLibrary1.Class1")
Dim str1 As String = j.ret()
Dim aaaa As Boolean = i.his()
But an exception hsa occurred when i.his() is called. Apparently, i is still NULL. When I check, I realise that b is loading from a.dll instead of b.dll.
But I have already make sure b LoadFrom b.dll. Can anyone advise?