Getting further. var className = childNode.Attributes["ClassName"].Value; //child node is the current node in my xml Type classType = parentObject.GetType(); // parentObject is the current object I'm dealing with, that I'm attempting to get a property for FieldInfo info = classType.GetField(className); PropertyInfo pi = classType.GetProperty(className);
And to get at my object: object childObject = info.GetValue(parentObject) Now my next issue: I'm attempting to validate this objects and I'm using a couple of Interfaces. One is "IValidatable" which expects an object type. So instead now I'm attempting to do something like: object childObject = info.GetValue(parentObject) As IValidatable<classType>; but "classType" is invalid in this instance. How would I dynamically specify the type for my interface??
