Split user.config into different files for faster saving
        Posted  
        
            by HorstWalter
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by HorstWalter
        
        
        
        Published on 2010-05-10T16:59:36Z
        Indexed on 
            2010/05/10
            17:04 UTC
        
        
        Read the original article
        Hit count: 338
        
In my c# Windows Forms application (.net 3.5 / VS 2008) I have 2 settings files resulting in one user.config file.
One setting file consists of larger data, but is rarely changed. The frequently changed data are very few. However, since the saving of the settings is always writing the whole (XML) file it is always "slow".
SettingsSmall.Default.Save(); // slow, even if SettingsSmall consists of little data 
Could I configure the settings somehow to result in two files, resulting in:
SettingsSmall.Default.Save(); // should be fast
SettingsBig.Default.Save(); // could be slow, is seldom saved
I have seen that I can use the SecionInformation class for further customizing, however what would be the easiest approach for me? Is this possible by just changing the app.config (config.sections)?
© Stack Overflow or respective owner