|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Could we control the order of Properties when using System.xml.SerializeHi,
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 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 Show quote "Si Jingnan" <jingnan***@gmail.com> wrote in message news:%23UVBaEn5FHA.3188@TK2MSFTNGP15.phx.gbl... > 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 G [MVP] wrote:
> Hi Jingnan, Thank you, I have tried the IXmlSerializable in .Net 2.0, it works fine, > > 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 > but not work in .Net 1.1, Is there any way to do it under .Net 1.1? Regards Jingnan |
|||||||||||||||||||||||