T
Tom
OK,
I have an object that I would like to serialize to an XML file. I can do
that successfully, but if I modify the object to have a constructor that
takes parameters, I get the following error message:
Object cannot be serialized because it does not have a parameterless
constructor
While this error message makes perfectly clear what the problem is, I still
don't understand why this is a problem. My google skills seem to be lacking
today too.
Can anybody out there explain why I can't serialize an object to XML if it
has a constructor that has parameters?
Thanks.
I have an object that I would like to serialize to an XML file. I can do
that successfully, but if I modify the object to have a constructor that
takes parameters, I get the following error message:
Object cannot be serialized because it does not have a parameterless
constructor
While this error message makes perfectly clear what the problem is, I still
don't understand why this is a problem. My google skills seem to be lacking
today too.
Can anybody out there explain why I can't serialize an object to XML if it
has a constructor that has parameters?
Thanks.