So, in the absence of class references, how would you implement the deserialization example? Let's say you have a tree of objects in JSON or XML format, and each object in the tree contains a property named Class that's a string type, the name of a class in your program that is capable of containing one or more child objects to match the tree structure.
How do you deserialize this?
(Not trying to challenge you or be argumentative or anything; just trying to get in the same page and see what you're ised to)
I found the solution to one bug while trying to test another and got all distracted. :)
@MasonWheeler Anyway, to answer the question, Activator.CreateInstance() can create an object from a string of a class name.
Actually, looking at it, it returns an ObjectHandle object, which I'd never actually noticed before. It lets you pass around the object without attaching any type information to it, although you have to .Unwrap() it before you can use it.
@fredsbend Sorry to disappoint. Although it could be a fun exercise to go over the discussion of class references and try and make everything into a religious reference...
It'll have to wait for another day, though. I too am about to run out.