I have an XML class inside a .NET 3.5 project which is the top level of the XML file to be generated. I want the element it creates to have a different name called "PersonalAddresses" instead of "Addresses". I get an error when I try to add an XmlElement attribute to the class to set the name of the element it generates. The TypeName of the XmlType attribute doesn't change the name of the generated element. How can I change the generated element name for the class to "PersonalAddresses"?
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class Addresses
{ class code ... }