XmlSerializer - There was an error reflecting type
Posted
by oo
on Stack Overflow
See other posts from Stack Overflow
or by oo
Published on 2008-09-13T14:40:21Z
Indexed on
2010/03/22
12:31 UTC
Read the original article
Hit count: 1141
Using C# .NET 2.0, I have a composite data class that does have the [Serializable] attribute on it. I am creating an XMLSerializer
class and passing that into the constructor:
XmlSerializer serializer = new XmlSerializer(typeof(DataClass));
I am getting an exception saying: There was an error reflecting type.
Inside the data class there is another composite object. Does this also need to have the [Serializable] attribute or by having it on the top object does it recursively apply it to all objects inside?
Any thoughts?
© Stack Overflow or respective owner