Is there a way to achieve this? I have a class name that I pass via query string and I want to make a new instance based on that.
What I have tried:
Private Function Carregar() As Object
Dim bal = String.Concat("PROTBAL.", Request.QueryString("nomeBAL"))
Dim ent = Request.QueryString("nomeENT")
Dim codigo = Request.QueryString("codigo")
Dim descricao = Request.QueryString("descricao")
Dim teste = Activator.CreateInstance(Type.GetType(bal))
Return teste.Listar()
End Function
The thing is the variable teste
is always Nothing
.