I have MyClass.
MyClass
And then I have this string s = \"MyClass\";. How can I get Type from the string s
string s = \"MyClass\";
s
To just get the type object from the string, use:
Type mytype = Type.GetType(typeName);
You can then pass this to Activator.CreateInstance():
Activator.CreateInstance()
Activator.CreateInstance(mytype);