You can use:
Activator.CreateInstance(Type.GetType(typeName))
Of course, this only works for types without a constructor without parameters.
Refresh (initialize the object):
# 4 :
dynamic newObj = Activator.CreateInstance(Type.GetType(typeName));
newObj.NestedName = str;
LINQ to XML :
var list = XMLFile.Select(someObjs => {
dynamic nestedObj = Activator.CreateInstance(
Type.GetType(someObjs.Element("nestedObj").Element("type")));
nestedObj.NestedName = (string)someObjs.Element("nestedObj").Element("name");
return new someObj {
Name = (string)someObjs.Element("name"),
NestedObj = nestedObj
};
}).ToList();