Re: XML serialisation - error reflecting type
- From: ssamuel@xxxxxxxxx
- Date: 23 Oct 2006 16:06:46 -0700
Paul,
Catch the exception and check the InnerException or just ToString() it
and dump it somewhere you can read it.
Stephan
Paul E Collins wrote:
I'm using XmlSerializer.Serialize method from System.Xml.Serialization
on one of my own classes and getting the following error:
"An unhandled exception of type 'System.InvalidOperationException'
occurred in system.xml.dll
Additional information: There was an error reflecting type
'<MyProjectName>.<MyClassName>'."
My class contains various instances of other classes (such as Uri and
Regex), and I know that some of them can't be serialised and must have
[XmlIgnore] applied and custom properties written for them instead,
but there are lots of these (some nested) - is there any way that I
can find out which particular field in which class is causing the
exception?
Eq.
.
- References:
- XML serialisation - error reflecting type
- From: Paul E Collins
- XML serialisation - error reflecting type
- Prev by Date: Re: Trying to understand interfaces
- Next by Date: Re: Read XML File
- Previous by thread: XML serialisation - error reflecting type
- Next by thread: operator ++ overload - How To
- Index(es):
Relevant Pages
|