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));
as Mitch Said u can use Activator.CreateInstance(Type.GetType ..., Also ur type should be in one of a dlls in the execution path, u can copy the dll in output folder or make it com visible and register it in GAC, ...