c# - XmlSerializer - There was an error reflecting type -
using c# .net 2.0, have composite data class have [serializable] attribute on it. creating xmlserializer class , passing constructor:
xmlserializer serializer = new xmlserializer(typeof(dataclass)); i getting exception saying:
there error reflecting type.
inside data class there composite object. need have [serializable] attribute, or having on top object, recursively apply objects inside?
look @ inner exception getting. tell field/property having trouble serializing.
you can exclude fields/properties xml serialization decorating them [xmlignore] attribute.
i don't think xmlserializer uses [serializable] attribute, doubt problem.
Comments
Post a Comment