I have a static property that I need to access by name without instantiating the class.
THIS WORKS:
var importantVar = MyClass.MyStaticProperty;
THIS DOESN"T WORKS
var qualifiedName = "MyObjects.MyClass";
var theType = Type.GetType(qualifiedName);
var importantVar = (theType).MyStaticProperty;
theType returns null? How can I do this? Thanks!
Aucun commentaire:
Enregistrer un commentaire