473,385 Members | 1,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Element Order in Serialized Class

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.

Nov 12 '05 #1
1 984
DC
http://tinyurl.com/8a8c8
"Tom Kiernan" <To********@discussions.microsoft.com> wrote in message
news:C0**********************************@microsof t.com...
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.

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Lars | last post by:
Hello All, I have a question: is it possible to set the order of the elements of serialized object? Lets say we have Public Class Order Public Price As Decimal Private Quantity As Decimal...
4
by: Hollywood | last post by:
I'm using XML serialization to produce the following XML document: <TestDoc xmlns:srd="some-url"> <Additional> <Security> <srd:Login>login_id</srd:Login> <srd:Password>password</srd:Password>...
1
by: Daniel Lidström | last post by:
Hello, how can I control the order of which elements are serialized. For example, my class looks like: public __gc class Author { public: Author(); // get/set methods
1
by: Lena | last post by:
I have generated a proxy class derived from System.Web.Services.Protocols.SoapHttpClientProtocol One of my classes is defined as public class MyClass { public MyClass() {
0
by: hdsj | last post by:
Hi All, Hoping someone can solve a problem for me. I am modifying the schema for a rather complex web service written in VB.NET. The services uses a large number of serialized classes to...
8
by: jamie | last post by:
Here's a class I'm working with public class BatchHeader { public string ScaleSite; public string FromScaleDate;
3
by: CindyRob | last post by:
I am using .NET framework 1.1 SP1, .NET framework SDK 1.1 SP1, with hotfix 82202, Visual studio .NET 2003 with hotfix 823639. I have generated a proxy class using wsdl.exe from a schema that has an...
9
by: Philipp | last post by:
Hello. OK I know this is the most asked question in XML (it says in some tutorial), but still. Please give me your insight on this (as I'm a newbie). I want to store parameters for a programm in...
1
by: Phil Galey | last post by:
I'm using XMLSerializer in VB.NET to serialize class-based objects to XML. It's serializing fine, except that I don't seem to have control over the order in which the various fields (properties) of...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.