using System.Xml.Serialization;
public static void Main(string[] args)
Addresses = new clsPlaces
var serializer = new XmlSerializer(typeof(clsPerson));
var settings = new XmlWriterSettings
OmitXmlDeclaration = true
using (var sw = new StringWriter())
using (var xw = XmlWriter.Create(sw, settings))
serializer.Serialize(xw, p, new XmlSerializerNamespaces(new[] { XmlQualifiedName.Empty }));
Console.WriteLine(sw.ToString());
[XmlElement(Namespace = "www.whatever.co.uk")]
public clsPlaces Addresses;
public string Home { get; set; }
public string Work { get; set; }