G
Guest
Is it possible to decide on the type of an object at run time. So in
pseudo-code I am looking for one (or preferably both) of the following....
string s = "SomeExistingClass"
ClassTypeInString(s) MyThing = new ClassTypeInString(s) ;
....or....
SomeClass myVar = new SomeClass() // and later on we do...
ClassTypeOfObject(myVar) MyThing = new ClassTypeOfObject(myVar)
I suspect there is something in System.Reflection. I dipped a toe in there,
but the water looks awfully deep for a beginner. I am trying to convert some
powerbuilder code and I want the equivalent of...
myObj = Create using sSomeStringVariable
Many thanks to the hundreds who reply...
pseudo-code I am looking for one (or preferably both) of the following....
string s = "SomeExistingClass"
ClassTypeInString(s) MyThing = new ClassTypeInString(s) ;
....or....
SomeClass myVar = new SomeClass() // and later on we do...
ClassTypeOfObject(myVar) MyThing = new ClassTypeOfObject(myVar)
I suspect there is something in System.Reflection. I dipped a toe in there,
but the water looks awfully deep for a beginner. I am trying to convert some
powerbuilder code and I want the equivalent of...
myObj = Create using sSomeStringVariable
Many thanks to the hundreds who reply...