I have an assembly asdf.dll and it has class Class1.
How can I get type Class1?
string a = "Class1"; //Class1 is the name of class in asdf.dll
string typeString = typeof(Class1).FullName; // here I only have the string Class1 and not Class Class1
AssemblyName assemblyName = AssemblyName.GetAssemblyName("asdf.dll");
Type type = Type.GetType(typeString + ", " + assemblyName);
How can I get the class type from a string containing the class name?
source
share