/// <summary> /// Provides example code for the Save(Stream) method /// </summary> public static void SaveStreamExample() { RsdDocument document = new RsdDocument(); // Modify document state using public properties and methods using (Stream stream = new FileStream("RsdDocument.xml", FileMode.Create, FileAccess.Write)) { document.Save(stream); } }
/// <summary> /// Provides example code for the Save(XmlWriter) method /// </summary> public static void SaveXmlWriterExample() { RsdDocument document = new RsdDocument(); // Modify document state using public properties and methods using (Stream stream = new FileStream("RsdDocument.xml", FileMode.Create, FileAccess.Write)) { XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; using (XmlWriter writer = XmlWriter.Create(stream, settings)) { document.Save(writer); } } }