J
jernej goricki
Hi,
Is it possible to do this in vb.net :
1.)To make a function that would have a string parameter ClassName
2.)This function would return an object of the same type as the ClassName
parameter was.
For example, in my project a have this classes : ClassPerson, ClassCar,
ClassXXX...........
Dim objectA as Object = GetNewObject(ClassPerson)
' ObjectA would be of a type ClassPeron
Public function GetNewObject(ClassName as string)
return new object instance of a type ClassName
End function
Thanks for your help!
Is it possible to do this in vb.net :
1.)To make a function that would have a string parameter ClassName
2.)This function would return an object of the same type as the ClassName
parameter was.
For example, in my project a have this classes : ClassPerson, ClassCar,
ClassXXX...........
Dim objectA as Object = GetNewObject(ClassPerson)
' ObjectA would be of a type ClassPeron
Public function GetNewObject(ClassName as string)
return new object instance of a type ClassName
End function
Thanks for your help!