How to control the root name with which an array of a custom class objects are serialized????

B

Bob Rock

Hello,

is there a way of controlling the name with which an array of objects of a
custom class is serialized???

public class MyClass
{
.......
}

[WebMethod]
public MyClass[] MyMethod()
{
.......
.......
}

When serializing an array of MyClass objects through a web method I get as
the root node something like <ArrayOfMyClass1 xmlns="...." ....>.
I'd like to be able to define myself the name of the root element. Can this
be done???

Bob Rock
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top