XmlSerializer

XmlSerializer

Posted on

var stringBuilder = new StringBuilder();
var stream = new StringWriter(stringBuilder);
var serializer = new XmlSerializer(typeof(TellusSettings));

serializer.Serialize(stream, defaultWebsiteSettings.TellusSettings);

File.WriteAllText(@"C:\temp\web.txt", stringBuilder.ToString());