|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Activator CreateInstance in IFormatter implementationIFormatter to use in a project that will allow for cross version compatibility. I have built the implementation in such a way that if the object it is serializing is not in the same assembly then it is treated as version specific, but anything inside the assembly is considered to be version independent. I have the serialization side complete (subject to some through testing), but when it comes to the de-serialize side I'm a little stuck. I intend to use the FieldInfo object to populate a target object's fields, but I can't populate an object until I've created an instance of it. This is all well and good, but how do I decided which constructor I call? Surely I can't enforce the requirement that the objects I serialize have a default constructor, that won't work for types that have system types that need more complex constructors, for example strings. Is there a way that I can have an object instance created for me without doing a lot of work to implement constructor intelligence? Thanks for any help. Rob |
|||||||||||||||||||||||