There is no error reported. I just have the usual serializer call with the
object.GetType() in the first parameter and the extra types for the array of
objects , it works fine in the inline but as a generalized method its not
serializing the array of types.
I am passing in to the generaliezd one as generalSerializer(object o,
Type[] t) and passing in o.GetType(), and t[0] = someType.GetType(); I
even tried typeof(blah.blah) and same result.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:Os**************@TK2MSFTNGP12.phx.gbl...
Can you give a small example? Is there an error?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
<di********@discussion.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... Hey,
I have made a method that would take any object o and an array of
extraTypes to construct a XmlSerializer object then call
.Serialize(stream, object)... When I have this called within the same method as the type
it works fine but when I am passing this type and the extra types array Its
got the subtypes but its not generating the XML.
I am passing in ob.GetType(), and xtraTypes as the constructor
parameters to XmlSerializer(..)
According to the debugger it has the type, the data and subtypes ok,
its just not serializing it to XML properely.
Is this odd behaviour of the Serializer?