Reading Nested Classes from Reflection

Sometimes you need to create instances of nested classes via reflection, so you need to read the type of the nested class from a configuration file, for example web.config.
So, what it its format?

The answer is: "MyNamespace.MyParentClass+MyChildClass, MyAssemblyName, Version=version, Culture=culture, PublicKeyToken=publicKeyToken"

Just a few notes:

  • In bold is the + separating the Namespace.ParentClass from the ChildClass
  • The assembly name doesn't contain the .dll file extension
  • An example of version is 1.0.0.0 and an example of culture is neutral