I am trying to get the type of a class by calling Type.GetType(), however it is throwing an null reference exception. I’m supplying the fully qualified name of the class as a string, I’m not sure what I am doing wrong. Here is what I am doing:
Type.GetType("The.Name.Space.TheClassName")
That is the fully qualified name of the class, it works fine for import statements. Could anyone tell me what I am doing wrong? Any suggestions would be very much appreciated. Thanks!
Edit: code block
You need to supply an AssemblyQualifiedName for
Type.GetType(). Here‘s an interesting blog post about several caveats of usingType.GetType().