Groups | Blog | Home
all groups > dotnet xml > october 2005 >

dotnet xml : Element Order in Serialized Class


Tom Kiernan
10/5/2005 8:07:02 PM
I have a class written in C# that generally serializes fine. The issue that
I have is that I need to be able to submit the serialized data to another
system and that system seems to be very sensitive to the order of the
elements.

Is there any way to force the classes within the main (root) class to be in
a certain order. When I serialize it, the order actually seems sort of
random as it doesn't seem to matter which class is defined first in the
source file or instantiated first, etc.

As background, I create the class and member classes and fill in the
appropriate data. I then create an XMLSerializer object and use the
Serialize method.

Any ideas would be appreciated.


DC
10/6/2005 2:12:46 PM
http://tinyurl.com/8a8c8


[quoted text, click to view]

AddThis Social Bookmark Button