var mystring = "MyCompany.MyType.Localization.Strings.MyString"
In C#, is there a way I could fill it up such that
var abc = GetReflectedValue(mystring);
Is reflection the only way? (how?) Or any more efficient ways?
var mystring = "MyCompany.MyType.Localization.Strings.MyString"
In C#, is there a way I could fill it up such that
var abc = GetReflectedValue(mystring);
Is reflection the only way? (how?) Or any more efficient ways?
It's not 100% clear what you are trying to do. Do you mean create an instance of an object given only it's string type name? If so, use Activator.CreateInstance:
var item = Activator.CreateInstance(Type.GetType(mystring));