/// <summary> /// Saves the profiles in the configuration file. /// </summary> /// <param name="profiles"></param> public static void SaveConfig( ArrayList profiles ) { // Use XML Serializer to serialize the content of the specified array list XmlSerializer serializer = new XmlSerializer( typeof( ConfigWrapper ) ); // open the profile file StreamWriter writer = new StreamWriter( PROFILE_FILE_NAME, false ); try { ConfigWrapper wrapper = new ConfigWrapper(); wrapper.Profiles = profiles; // Serialize the array list to the file serializer.Serialize( writer.BaseStream, wrapper ); } catch( Exception x ) { System.Diagnostics.Debug.WriteLine( x.Message ); } // close the file writer.Close(); }