Type.GetType("namespace.a.b.ClassName") returns null

c#, reflection

Solution

`Type.GetType("namespace.qualified.TypeName")` only works when the type is found in either mscorlib.dll or the currently executing assembly.

If neither of those things are true, you'll need an assembly-qualified name:

Type.GetType("namespace.qualified.TypeName, Assembly.Name")

Problem

This code: ``` Type.GetType("namespace.a.b.ClassName") ``` returns `null`. I have in the usings: ``` using namespace.a.b; ``` The type exists, it's in a different class library, and I need to get it by it's name given as string.

Original source

Related problems