I guess it is returning the proper thing myParam as String
************ CODE ****************
obj = New Object() {"Nicolas"}
'
ass = Assembly.LoadFrom(thisDLL)
Console.WriteLine(ass.GetName.Name)
Console.WriteLine("Types:")
For Each t In ass.GetTypes
Console.WriteLine(t.Namespace & " : " & t.Name) ' & " = " &
t.IsInterface)
If t.Name.ToLower = "cA".ToLower Then
Dim ctor As ConstructorInfo
Dim param As ParameterInfo
For Each ctor In t.GetConstructors()
Console.WriteLine("Constructor:" & ctor.Name)
For Each param In ctor.GetParameters
Console.Write(vbTab & param.Name & ":")
Console.WriteLine(param.ParameterType.FullName)
Next
Next
o = Activator.CreateInstance(t, obj)
Console.WriteLine(o Is Nothing)
Exit For
End If
Next
*********** CONSOLE **************************
Starting...
dllA
Types:
dllA.My : MyApplication
dllA.My : MyComputer
dllA.My : MyProject
dllA.My : MyWebServices
dllA.My : ThreadSafeObjectProvider`1
dllA.NA : iA
dllA.NA : cA
Constructor:.ctor
myParam:System.String
Constructor on type 'dllA.NA.cA' not found.
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder
bin
der, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr,
Binde
r binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at maindll.Module1.launchDll(String thisDLL) in
D:\Work\test\maindll\maindll\
Module1.vb:line 80