PC Review


Reply
Thread Tools Rate Thread

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

 
 
Si Jingnan
Guest
Posts: n/a
 
      11th Nov 2005
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
 
Reply With Quote
 
 
 
 
Manoj G [MVP]
Guest
Posts: n/a
 
      12th Nov 2005
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/archiv...02/205798.aspx

--
HTH,
Manoj G
MVP, Visual Developer
http://msmvps.com/manoj

"Si Jingnan" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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



 
Reply With Quote
 
Si Jingnan
Guest
Posts: n/a
 
      14th Nov 2005
Manoj G [MVP] wrote:
> 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/archiv...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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Serialize System.Windows.Forms.Control michelqa Microsoft C# .NET 5 29th Dec 2008 02:55 AM
Server Control Custom Properties Order todd.freed@gmail.com Microsoft ASP .NET 0 7th Jul 2006 11:24 PM
serialize datagrid properties Vikram Microsoft ASP .NET 2 14th Dec 2005 06:28 AM
Serialize Element Order =?Utf-8?B?TGFycw==?= Microsoft Dot NET 0 6th Aug 2004 08:59 AM
How to serialize a System.Windows.Form.Control Microsoft C# .NET 2 22nd Oct 2003 04:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:06 AM.