Could we control the order of Properties when using System.xml.Serialize

  • Thread starter Thread starter Si Jingnan
  • Start date Start date
S

Si Jingnan

Hi,
When using System.Xml.Serialize, could we control the output order of
proeprties? I want to first render some properties, then another based
on different cases, or I want to first output derived class's properties
then base class's, Is there any programming way to do it?

Thanks
Jingnan
 
Manoj said:
Hi Jingnan,

I guess you will have to implement the IXmlSerializable interface for having
that sort of control. Unfortunately, this interface is
undocumented/unsupported until now, .NET 2.0.
You also may want to look at this blog post form more info on the same.
http://weblogs.asp.net/cweyer/archive/2004/08/02/205798.aspx

Thank you, I have tried the IXmlSerializable in .Net 2.0, it works fine,
but not work in .Net 1.1, Is there any way to do it under .Net 1.1?

Regards
Jingnan
 
Back
Top