Monodoc.Widgets.Catalog.Save C# (CSharp) Method

Save() public method

public Save ( ) : void
return void
        public void Save()
        {
            try {
                if (path == null)
                    throw new Exception ("Path not set");

                string cat_file = System.IO.Path.Combine (path, ".catalog.xml");
                XmlSerializer serializer = new XmlSerializer (typeof (Catalog));
                using (FileStream fs = File.Create (cat_file))
                    serializer.Serialize (fs, this);
            } catch (Exception e) {
                Console.Error.WriteLine ("Error saving settings: " + e);
            }
        }