I have custom ConfigurationSection
and call Configuration.Save()
after some modifications against it:
var config = ConfigurationManager.OpenMappedExeConfiguration(
new ExeConfigurationFileMap() { ExeConfigFilename = "My.config" },
ConfigurationUserLevel.None);
if (config != null)
{
// do stuff
config.Save();
}
Currently it performs some formatting of resulting XML. For example, replaces tabs with spaces, inserts line-breaks if it thinks that it's too long (> ~130 characters), etc.
How can I preserve or control that?