Hi,
I´d like to serialize a List<T> to XML.
Let´s say I have;
Okay, If I were to serialize this, I would get sth similiar to this;Code:Class Person { ,.... } And another Class; Class People { Private People() { } Public void CreatePerson() { Person pr = new Person(); this.myPersonList.Add(pr); } List<Person> myPersonList = new List<Person>(); public List<Person> ReturnMyPersonListCollection { get { return myPersonList; } } }
(Asume that I have added these attributes,
[System.Xml.Serialization.XmlAttribute("")]
to the public properties of the Person Class).
Code:<ReturnMyPersonListCollection> <Person>,.....................</Person> <Person>,.....................</Person> <Person>,.....................</Person> <ReturnMyPersonListCollection>
The problem is the outter tag ,<ReturnMyPersonListCollection>,
I´d like to be able to change this tag to what ever I´d like it to be,..
Thanks.




Reply With Quote