471,315 Members | 1,519 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How to XMLSerialze an object which has an object array as filed?

Hi, Could anyone give me some help about the following problem?
I need to XMLSerialize an object of the following class:

[Serializable]
public class FunctionCallingList
{
public string typeName;
public string methodName;
public DateTime time;
public object[] args;
}
And the element of args here could be different(maybe 1 int, 1 doulbe,
1 array and 1 user define type object, which may has another object
arrray inside).

But when I use the following code:
FunctionCallingList = new FunctionCallingList(...);
xmlSerializer = myGetXmlSerializer(typeof(fcl));
xmlSerializer.Serialize(myFuncListWriter, fcl);
it turns out that XMLSerialzer failed because of this object[] args;.
And the element of args here could be different(maybe 1 int, 1 doulbe,
1 array and 1 user define type object).

Could anyone tell me how to handle this issue? Thank you very much.

Feb 9 '06 #1
1 1167

This discussion thread is closed

Replies have been disabled for this discussion.

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.