Invoking Class from a variable string in VB 2005...!

  • Thread starter Thread starter Gustavo Arriola
  • Start date Start date
G

Gustavo Arriola

Hello to all!
I am trying to accede to a method of a class invoking(the class) from a
variable string. The class is in other assembly called "infoInsumo"

The code:

Dim Tipo As Type = Type.GetType(Nodo) 'Nodo = "infoInsumo,
infoInsumo" -->The assembly does not have root namespace
Dim Clase As Object = Activator.CreateInstance(Tipo,
Reflection.BindingFlags.CreateInstance)

But in line "2" the following error jumps to me:

Constructor on type 'infoInsumo' not found.

What implementation I must make in the contructor of the class (infoInsumo)
so that it can obtain my objective?

From already thank you very much!
Gustavo Arriola
 
Make sure you have a reference to the DLL
and that the class is public.

Tommaso

Gustavo Arriola ha scritto:
 
If, I have created a reference from VS 2005 and class she is public!
What I must do now?

From already thank you very much!
Gustavo
 
Back
Top