using System.Collections.Generic;
using System.Xml.Serialization;
public static void Main()
List<ListType> list = new List<ListType>();
list.Add(new ListType{ StringProperty = "hello"} );
list.Add(new ListType{StringProperty="world"});
EnvelopDto obj = new EnvelopDto{ ListProperty=list };
var settings = new System.Xml.XmlWriterSettings
OmitXmlDeclaration = true
var ns = new XmlSerializerNamespaces(new[] { System.Xml.XmlQualifiedName.Empty });
using (var stream = new System.IO.StringWriter())
using (var writer = System.Xml.XmlWriter.Create(stream, settings))
var serializer = new XmlSerializer(typeof(EnvelopDto));
serializer.Serialize(writer, obj, ns);
Console.Write(stream.ToString());
public string StringProperty {get;set;}
public List<ListType> ListProperty{get;set;}